order.vue 27 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025
  1. <template>
  2. <view class="back">
  3. <!-- 地址 -->
  4. <view class="address" @click="toadd">
  5. <view class="u-flex u-row-between">
  6. <view class="add" v-if="addinfo">{{addinfo.full_address}}</view>
  7. <view class="" v-else>请添加您的收货地址</view>
  8. <u-icon name="arrow-right" size='16'></u-icon>
  9. </view>
  10. <view class="info" v-if="addinfo">
  11. <text>{{addinfo.name}}</text>
  12. <text style="margin-left: 20rpx;">{{replacePhoneToStar(addinfo.mobile)}}</text>
  13. </view>
  14. </view>
  15. <!-- 商品 -->
  16. <view class="shop">
  17. <view class="" v-if="typea=='shop'">
  18. <view class="u-flex" style="margin-top: 32rpx;" v-for="(item,idx) in selelist" :key="idx">
  19. <image :src="item.image" style="width: 184rpx;height: 184rpx;" mode=""></image>
  20. <view class=" "
  21. style="margin-left: 20rpx;flex-direction: column;justify-content: space-between;height: 184rpx;display: flex;flex:1">
  22. <view class="">
  23. <text class="toptitle">{{item.name_cn}}</text>
  24. <view class="weight">{{item.sku_item[0].item}} </view>
  25. </view>
  26. <view class="u-flex u-row-between">
  27. <view class="">
  28. <text class="money">¥</text>
  29. <text class="money" style="font-size: 34rpx;">{{item.sku_item[0].price}}</text>
  30. </view>
  31. <view class="">{{item.cart.goods_num}}</view>
  32. </view>
  33. </view>
  34. </view>
  35. </view>
  36. <view class="" v-else>
  37. <view class="">
  38. <image :src="goodinfo.merchant.image" style="width: 38rpx;height: 38rpx;" mode=""></image>
  39. <text class="name">{{goodinfo.merchant.merchant_name}}</text>
  40. </view>
  41. <view class="u-flex" style="margin-top: 32rpx;">
  42. <image :src="sku_info.image" style="width: 184rpx;height: 184rpx;" mode=""></image>
  43. <view class=" "
  44. style="margin-left: 20rpx;flex-direction: column;justify-content: space-between;height: 184rpx;display: flex;flex:1">
  45. <view class="">
  46. <text class="toptitle">{{goodinfo.name_cn}}</text>
  47. <view class="weight">{{sku_info.item}} </view>
  48. <!-- <view class="">{{Number(sku_info.weight)*value}}kg</view> -->
  49. </view>
  50. <view class="u-flex u-row-between">
  51. <view class="">
  52. <text class="money">¥</text>
  53. <text class="money"
  54. style="font-size: 34rpx;">{{goodinfo.is_discount==1? (Number(sku_info.price*1000)*Number(value*1000))/1000000:(Number(sku_info.discount_price*1000)*Number(value)*1000)/1000000}}</text>
  55. </view>
  56. <u-number-box v-model="value">
  57. <view slot="minus" class="">
  58. <u-icon name="minus" size="12"></u-icon>
  59. </view>
  60. <input slot="input" v-model="value" style="width: 40px;text-align: center;"
  61. class="input"></input>
  62. <view slot="plus" class="">
  63. <u-icon name="plus" size="12"></u-icon>
  64. </view>
  65. </u-number-box>
  66. </view>
  67. </view>
  68. </view>
  69. </view>
  70. </view>
  71. <!-- 物流 -->
  72. <view class="logistics u-flex u-row-between">
  73. <text style="font-weight: 600;width: 320rpx;">{{i18n.flow}}</text>
  74. <view class="u-flex" @click="show = true">
  75. <text class="change">{{containname1?type1+' | '+containname1 :i18n.selection}}</text>
  76. <u-icon name="arrow-right" size='16'></u-icon>
  77. </view>
  78. </view>
  79. <!-- 推荐 -->
  80. <view class="recommend">
  81. <view class="top">
  82. <image src="static/images/recommend.png" style="width: 124rpx;height: 30rpx;" mode=""></image>
  83. </view>
  84. <view class="bottom">
  85. <scroll-view scroll-x class="u-flex" style="column: gap 28rpx; display: flex;">
  86. <view class="u-flex" style="column-gap: 16rpx; ">
  87. <view class="" v-for="(item,idx) in swiptlist" :key="idx" @click="todetail(item.id)">
  88. <image :src="item.image" style="width: 156rpx;height: 156rpx;" mode="">
  89. </image>
  90. <view class="title" v-if="language =='zh-CN'">
  91. {{item.name_cn}}
  92. </view>
  93. <view class="title" v-if="language =='en-US'">
  94. {{item.name_en}}
  95. </view>
  96. <view class="title" v-if="language =='es-ES'">
  97. {{item.name_es}}
  98. </view>
  99. <view class="title" v-if="language =='it-IT'">
  100. {{item.name_ita}}
  101. </view>
  102. <view class="money" style="color: #F83224;font-size: 20rpx;">
  103. <text>¥</text>
  104. <text
  105. style="font-size: 28rpx;">{{item.is_discount==0?item.discount_price.slice(0,-3):item.price.slice(0,-3)}}</text>
  106. <text>{{item.is_discount==0?item.discount_price.slice(-3):item.price.slice(-3)}}</text>
  107. </view>
  108. </view>
  109. </view>
  110. </scroll-view>
  111. </view>
  112. </view>
  113. <!-- 商品相关 -->
  114. <view class="abount" style="margin-top: 20rpx;">
  115. <view class="u-flex u-row-between" style='margin-bottom:40rpx'>
  116. <view class="name">{{i18n.Commodityamount}}</view>
  117. <view class="money">
  118. ¥{{goodinfo.is_discount==1? (Number(sku_info.price*100)*Number(value*100))/10000:(Number(sku_info.discount_price*100)*Number(value*100))/10000}}
  119. </view>
  120. </view>
  121. <view class="u-flex u-row-between">
  122. <view class="name">{{i18n.Grosscommodityweight}}</view>
  123. <view class="money">{{Number(sku_info.weight)*value}}kg</view>
  124. </view>
  125. <view class="back u-flex" v-if="containname1">
  126. <image src="static/images/warning.png" style="width: 32rpx;height: 32rpx;" mode=""></image>
  127. <text
  128. style="margin-left: 12rpx;">{{i18n.buy}}{{max_weight}}kg{{i18n.price}}¥{{unit_fee}},{{i18n.morefavorable}}</text>
  129. </view>
  130. <view class="u-flex u-row-between" style='margin-bottom:40rpx;margin-top: 20rpx;'>
  131. <view class="name">{{i18n.Costperkilogram}}</view>
  132. <view class="money">{{containname1?unit_price:'需先选择货运方式'}}</view>
  133. </view>
  134. <view class="u-flex u-row-between">
  135. <view class="name">{{i18n.freight}}</view>
  136. <view class="money">{{containname1?sum:'需先选择货运方式'}}</view>
  137. </view>
  138. <view class="zong u-flex u-row-right">
  139. <view class="">
  140. <text class="small">{{i18n.subtotal}}</text>
  141. <text class="mon">¥</text>
  142. <text class="mon" v-if="typea=='shop'">{{goodsPrice}}</text>
  143. <text class="mon"
  144. v-else style="font-size: 40rpx;">{{goodinfo.is_discount==1? (Number(sku_info.price*100)*Number(value*100))/10000:(Number(sku_info.discount_price*100)*Number(value*100))/10000}}</text>
  145. </view>
  146. </view>
  147. </view>
  148. <view class="" style="height: 166rpx;"></view>
  149. <view class="btn u-flex u-row-right">
  150. <view class="u-flex">
  151. <text v-if="typea == 'shop'">{{i18n.Atotalof}}{{goodsWeight}}kg,</text>
  152. <text v-else class="kg">{{i18n.Atotalof}}{{Number(sku_info.weight) * value}}kg,</text>
  153. <text>{{i18n.total}}:</text>
  154. <text class="money" style="font-size: 28rpx;">¥</text>
  155. <text style="font-weight: bold;" class="money" v-if="typea=='shop'">{{(Number(sum*10000+ Number(goodsPrice)*10000))/10000 }}</text>
  156. <view class="" v-else>
  157. <text class="money" v-if="goodinfo.is_discount==1"
  158. style="font-weight: bold;">{{(Number(sum*10000+ Number(sku_info.price)*Number(value)*10000))/10000}}</text>
  159. <text class="money" v-if="goodinfo.is_discount==0"
  160. style="font-weight: bold;">{{(Number(sum*10000+ Number(sku_info.discount_price)*Number(value)*10000))/10000}}</text>
  161. </view>
  162. </view>
  163. <view class="order" @click="topay">
  164. {{i18n.Submitorder}}
  165. </view>
  166. </view>
  167. <!-- 跨境物流 -->
  168. <u-popup :show="show" @close="close" mode="bottom" closeIconPos='top-right' round='28'>
  169. <view style="padding: 40rpx 28rpx;box-sizing:border-box;">
  170. <view class="u-flex u-row-between">
  171. <view class="" style="width: 28px;height: 28px;"></view>
  172. <view class="poptitle">
  173. {{i18n.flow}}
  174. </view>
  175. <u-icon name="close" @click="close" color="background: #333333;" size="28"></u-icon>
  176. </view>
  177. <view class="u-flex " style="margin-top: 60rpx;flex-wrap: wrap;column-gap: 16rpx;">
  178. <view :class="index==idx?'active':'unactive'" v-for="(item,idx) in containerList"
  179. @click="change(item,idx)"
  180. style="display: flex;flex-direction: column;align-items: center;justify-content: center;margin-bottom: 28rpx;position: relative;">
  181. <image v-if="index==idx" src="static/images/change.png"
  182. style="width: 36rpx;height: 32rpx;position: absolute;top: 0;right: 0;" mode=""></image>
  183. <view class="logname" v-if="language =='zh-CN'">{{item.name_cn}}</view>
  184. <view class="logname" v-if="language =='en-US'">{{item.name_en}}</view>
  185. <view class="logname" v-if="language =='es-ES'">{{item.name_es}}</view>
  186. <view class="logname" v-if="language =='it-IT'">{{item.name_ita}}</view>
  187. <!-- <view class="wei">¥{{goodinfo.cate==0?item.normal_delivery_fee:item.special_delivery_fee}}/kg</view> -->
  188. <view class="wei" style="font-size: 32rpx;font-weight: 600;">¥{{item.unit_price}}/kg</view>
  189. </view>
  190. </view>
  191. <view class="nextto" @click="next">{{i18n.next}}</view>
  192. </view>
  193. </u-popup>
  194. <!-- 跨境物流下一步 -->
  195. <u-popup :safeAreaInsetTop='true' :show="show1" @close="close" mode="bottom" closeIconPos='top-right' round='28'
  196. bgColor='#F4F4F4'>
  197. <view style="padding: 40rpx 28rpx;box-sizing:border-box;position: relative;">
  198. <view class="u-flex u-row-between">
  199. <view class="" style="width: 28px;height: 28px;"></view>
  200. <view class="poptitle">
  201. {{i18n.flow}}
  202. </view>
  203. <u-icon name="close" @click="close" color="background: #333333;" size="28"></u-icon>
  204. </view>
  205. <scroll-view :scroll-y="true" style="500rpx">
  206. <view class="transport" style="margin-top: 32rpx;" @click="activea(item,idx)"
  207. v-for="(item,idx) in containlist" >
  208. <view class="u-flex u-row-between">
  209. <text class="yundate">{{i18n.Shipmentdate}} {{item.end_date}}</text>
  210. <image v-if="datechan==idx" src="/pageA/static/images/active.png"
  211. style="width: 36rpx;height: 36rpx;" mode=""></image>
  212. <image v-else src="/pageA/static/images/unactive.png" style="width: 36rpx;height: 36rpx;"
  213. mode=""></image>
  214. </view>
  215. <view class="u-flex u-row-between" style="margin-top: 28rpx;">
  216. <view class="chest">
  217. <text v-if="language =='zh-CN'">{{item.name_cn}}</text>
  218. <text v-if="language =='en-US'">{{item.name_en}}</text>
  219. <text v-if="language =='es-ES'">{{item.name_es}}</text>
  220. <text v-if="language =='it-IT'">{{item.name_ita}}</text>
  221. <text style="margin: 0 16rpx;">|</text>
  222. <text>{{i18n.Estimatedtimeofarrival}}{{item.transport_days}}{{i18n.Workingday}}</text>
  223. </view>
  224. <view class="mone">
  225. <text>¥</text>
  226. <text style="font-size: 48rpx;font-weight: 600;">{{item.sum}}</text>
  227. </view>
  228. </view>
  229. </view>
  230. </scroll-view>
  231. <view class="" style="height: 166rpx;"></view>
  232. <view class="enbottom u-flex u-row-between">
  233. <view class="cancel" @click="close">{{i18n.Cancel}}</view>
  234. <view class="confirm" @click="confirm">{{i18n.enter}}</view>
  235. </view>
  236. </view>
  237. </u-popup>
  238. </view>
  239. </template>
  240. <script>
  241. export default {
  242. data() {
  243. return {
  244. value: 1,
  245. show: false,
  246. index: '',
  247. show1: false,
  248. datechan: '',
  249. sku_info: {},
  250. goodinfo: {},
  251. swiptlist: [], //推荐列表
  252. language: 'zh-CN',
  253. containerList: [], //列表
  254. province_id: '',
  255. transport_type_id: '',
  256. containlist: [],
  257. containid: '', //货柜id
  258. containname: '', //货柜名称
  259. type: '', //货运方式名称
  260. containname1: '',
  261. type1: '',
  262. sum: '',
  263. unit_price: '',
  264. recommend_weight: '',
  265. sum1: '',
  266. unit_price1: '',
  267. recommend_weight1: '',
  268. max_weight: '',
  269. min_weight: '',
  270. unit_fee: '',
  271. addinfo: '',
  272. huoid: '',
  273. selelist: [],
  274. typea: '',
  275. goodsPrice: '',
  276. goodsWeight: '',
  277. stringcheck: ''
  278. };
  279. },
  280. computed: {
  281. i18n() {
  282. return this.$t('index')
  283. },
  284. },
  285. onLoad(options) {
  286. // url: '/pageA/order?sku=' + this.sku_info + '&value=' + this.value+'&goodinfo='+this.goodinfo
  287. if (options.typea) {
  288. console.log(22222);
  289. this.typea = options.typea
  290. this.selelist = JSON.parse(decodeURIComponent(options.selelist))
  291. this.goodsPrice = options.goodsPrice
  292. this.goodsWeight = options.goodsWeight
  293. this.stringcheck = options.stringcheck
  294. console.log(this.selelist);
  295. } else if (options) {
  296. this.value = options.value
  297. this.sku_info = JSON.parse(decodeURIComponent(options.sku));
  298. this.goodinfo = JSON.parse(decodeURIComponent(options.goodinfo))
  299. console.log(this.goodinfo);
  300. console.log(this.sku_info);
  301. }
  302. },
  303. onShow() {
  304. if (uni.getStorageSync('language') != '') {
  305. this.language = uni.getStorageSync('language')
  306. }
  307. this.recommend()
  308. // this.container()
  309. },
  310. methods: {
  311. todetail(id) {
  312. uni.reLaunch({
  313. url: '/pageA/productdetails?id=' + id
  314. })
  315. },
  316. //正则匹配手机号
  317. replacePhoneToStar: function(phone) {
  318. if (phone) {
  319. return phone.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2');
  320. }
  321. },
  322. //推荐重量
  323. recommendweight() {
  324. uni.$u.http.get('/api/express-order/recommend-container', {
  325. params: {
  326. container_id: this.containid,
  327. type: this.goodinfo.cate == 0 ? 'normal' : 'special'
  328. }
  329. }).then((res) => {
  330. console.log(res);
  331. this.max_weight = res.max_weight
  332. this.min_weight = res.min_weight
  333. this.unit_fee = res.unit_fee
  334. }).catch(() => {
  335. })
  336. },
  337. //货运类型列表
  338. transport() {
  339. uni.$u.http.get('/api/transport-type', {
  340. params: {
  341. province_id: this.province_id,
  342. }
  343. }).then((res) => {
  344. this.containerList = res
  345. this.transport_type_id = res[0].id
  346. if (this.language == 'zh-CN') {
  347. this.type = res[0].name_cn
  348. }
  349. if (this.language == 'en-US') {
  350. this.type = res[0].name_en
  351. }
  352. if (this.language == 'es-ES') {
  353. this.type = res[0].name_es
  354. }
  355. if (this.language == 'it-IT') {
  356. this.type = res[0].name_ita
  357. }
  358. }).catch(() => {
  359. })
  360. },
  361. //跳转到填写地址
  362. toadd() {
  363. var that = this
  364. uni.navigateTo({
  365. url: '/pageC/addressManagement/addressManagement?tabs=' + Number(0),
  366. events: {
  367. getadd(res) {
  368. that.addinfo = res
  369. that.province_id = res.province_id
  370. that.transport()
  371. }
  372. }
  373. })
  374. },
  375. //货柜列表
  376. container() {
  377. uni.$u.http.get('/api/container-base', {
  378. params: {
  379. is_page: 0,
  380. province_id: this.province_id,
  381. transport_type_id: this.transport_type_id,
  382. weight: Number(this.sku_info.weight) * this.value,
  383. type: this.goodinfo.cate == 0 ? 'normal' : 'special',
  384. length: Number(this.goodinfo.length) * this.value, // 是 String 长
  385. width: this.goodinfo.width, // 是 String 宽
  386. height: this.goodinfo.height, // 是 String 高
  387. }
  388. }).then((res) => {
  389. res.forEach((item) => {
  390. // if (item.sum != 0) {
  391. this.containlist.push(item)
  392. // }
  393. console.log(this.containlist);
  394. })
  395. // this.sum = this.containlist[0].sum
  396. // this.unit_price = this.containlist[0].unit_price
  397. if (this.goodinfo.is_shipping == 0) {
  398. this.sum = 0
  399. } else {
  400. this.sum = this.containlist[0].sum
  401. }
  402. if (this.goodinfo.is_shipping == 0) {
  403. this.unit_price = 0
  404. } else {
  405. this.unit_price = this.containlist[0].unit_price
  406. }
  407. this.recommend_weight = this.containlist[0].recommend_weight
  408. this.containid = this.containlist[0].id
  409. if (this.language == 'zh-CN') {
  410. this.containname = this.containlist[0].name_cn
  411. }
  412. if (this.language == 'en-US') {
  413. this.containname = this.containlist[0].name_en
  414. }
  415. if (this.language == 'es-ES') {
  416. this.containname = this.containlist[0].name_es
  417. }
  418. if (this.language == 'it-IT') {
  419. this.containname = this.containlist[0].name_ita
  420. }
  421. }).catch(() => {
  422. })
  423. },
  424. //运费满减
  425. config() {
  426. var that = this
  427. uni.$u.http.get('/api/config', {
  428. params: {
  429. module: 'free_shipping'
  430. }
  431. }).then((res) => {
  432. let goodsum = ''
  433. if (that.goodinfo.is_discount == 1) {
  434. goodsum = Number(that.sku_info.price * 100) * Number(that.value * 100) / 10000
  435. console.log('that.sum', that.sum);
  436. console.log('that.goodsum', goodsum);
  437. if (goodsum > res.free_shipping) {
  438. that.sum = 0;
  439. that.unit_price = 0;
  440. }
  441. } else {
  442. goodsum = Number(that.sku_info.discount_price * 100) * Number(that.value * 100) / 10000
  443. if (goodsum > res.free_shipping) {
  444. that.sum = 0
  445. that.unit_price = 0
  446. }
  447. }
  448. }).catch(() => {
  449. })
  450. },
  451. //商品推荐
  452. recommend() {
  453. uni.$u.http.post('/api/goods/recommend', {
  454. keyword: ''
  455. }).then((res) => {
  456. // this.swiptlist = res.reduce((a, b) => {
  457. // let lastIndex = a.length - 1
  458. // if (a[lastIndex].length < 3) {
  459. // a[lastIndex].push(b)
  460. // } else {
  461. // a.push([b])
  462. // }
  463. // return a
  464. // }, [
  465. // []
  466. // ])
  467. this.swiptlist = res
  468. }).catch(() => {
  469. })
  470. },
  471. change(item, index) {
  472. this.transport_type_id = item.id
  473. this.index = index
  474. if (this.language == 'zh-CN') {
  475. this.type = item.name_cn
  476. }
  477. if (this.language == 'en-US') {
  478. this.type = item.name_en
  479. }
  480. if (this.language == 'es-ES') {
  481. this.type = item.name_es
  482. }
  483. if (this.language == 'it-IT') {
  484. this.type = item.name_ita
  485. }
  486. },
  487. next() {
  488. this.show = false
  489. this.show1 = true
  490. this.type1 = this.type
  491. this.container()
  492. },
  493. activea(item, idx) {
  494. this.datechan = idx
  495. this.sum = item.sum
  496. this.unit_price = item.unit_price
  497. this.recommend_weight = item.recommend_weight
  498. this.containid = item.id
  499. if (this.language == 'zh-CN') {
  500. this.containname = item.name_cn
  501. }
  502. if (this.language == 'en-US') {
  503. this.containname = item.name_en
  504. }
  505. if (this.language == 'es-ES') {
  506. this.containname = item.name_es
  507. }
  508. if (this.language == 'it-IT') {
  509. this.containname = item.name_ita
  510. }
  511. },
  512. //确定
  513. confirm() {
  514. this.show1 = false
  515. this.containname1 = this.containname
  516. this.recommendweight()
  517. this.config()
  518. },
  519. // 取消
  520. close() {
  521. this.show = false
  522. this.show1 = false
  523. },
  524. //提交订单
  525. topay() {
  526. uni.$u.http.post('/api/order', {
  527. address_id: this.addinfo.id, //3 是 String 地址ID
  528. goods_id: this.goodinfo.id, //65 是 String 商品id
  529. goods_num: this.value, //2 是 String 商品数量
  530. sku_item_id: this.sku_info.id, //60 是 String 规格id
  531. cart_ids: this.stringcheck, //8,9 是 String 购物车id
  532. remark: '', //备注 是 String 备注
  533. merchant_goods_id: this.goodinfo.merchant_goods_id, //39 是 String 团长商品id
  534. container_id: this.containid, //1 是 String 货柜id
  535. share_merchant_id: '', // 是 String 分享团长id 分享商品的时候传
  536. belong: 0 //0 是 String 商品归属 0团长 1平台自营 2团长发布或者分享的平台自营商品、供应链商品
  537. }).then((res) => {
  538. console.log(res);
  539. uni.navigateTo({
  540. // url: '/pageA/payorder?sum=' + (Number(this.sum*10000+ Number(this.sku_info.discount_price)*Number(this.value)*10000))/10000 +'&orderid=' + res.id
  541. url: '/pageA/payorder?orderid=' + res.id + '&sum=' + res.amount
  542. })
  543. }).catch(() => {})
  544. }
  545. }
  546. }
  547. </script>
  548. <style lang="scss" scoped>
  549. .toptitle {
  550. font-family: PingFangSC, PingFang SC;
  551. font-weight: 400;
  552. // font-size: 22rpx;
  553. color: #222222;
  554. line-height: 32rpx;
  555. text-align: left;
  556. font-style: normal;
  557. // width: 148rpx;
  558. width: 100%;
  559. overflow: hidden;
  560. text-overflow: ellipsis;
  561. -webkit-line-clamp: 1;
  562. display: -webkit-box;
  563. -webkit-box-orient: vertical;
  564. word-break: break-all;
  565. }
  566. ::v-deep .u-status-bar {
  567. height: 0 !important;
  568. }
  569. .confirm {
  570. width: 398rpx;
  571. height: 84rpx;
  572. background: #F83224;
  573. border-radius: 42rpx;
  574. text-align: center;
  575. font-family: PingFangSC, PingFang SC;
  576. font-weight: 500;
  577. font-size: 32rpx;
  578. color: #FFFFFF;
  579. line-height: 84rpx;
  580. text-align: center;
  581. font-style: normal;
  582. }
  583. .cancel {
  584. width: 280rpx;
  585. height: 84rpx;
  586. border-radius: 42rpx;
  587. border: 2rpx solid rgba(151, 151, 151, 0.3);
  588. font-family: PingFangSC, PingFang SC;
  589. font-weight: 400;
  590. font-size: 32rpx;
  591. color: #444444;
  592. line-height: 84rpx;
  593. text-align: center;
  594. font-style: normal;
  595. }
  596. .enbottom {
  597. width: 750rpx;
  598. height: 166rpx;
  599. background: #FFFFFF;
  600. position: absolute;
  601. left: 0rpx;
  602. bottom: 0;
  603. padding: 0 24rpx;
  604. box-sizing: border-box;
  605. }
  606. .mone {
  607. font-family: JDZhengHT, JDZhengHT;
  608. font-weight: 400;
  609. font-size: 26rpx;
  610. color: #F83224;
  611. line-height: 32rpx;
  612. text-align: left;
  613. font-style: normal;
  614. }
  615. .yundate {
  616. font-family: PingFangSC, PingFang SC;
  617. font-weight: 550;
  618. font-size: 32rpx;
  619. color: #333333;
  620. line-height: 44rpx;
  621. text-align: left;
  622. font-style: normal;
  623. }
  624. .chest {
  625. font-family: SFPro, SFPro;
  626. font-weight: 400;
  627. font-size: 24rpx;
  628. color: #555555;
  629. line-height: 28rpx;
  630. text-align: left;
  631. font-style: normal;
  632. }
  633. .act {
  634. width: 702rpx;
  635. height: 164rpx;
  636. background: #FFFFFF;
  637. border-radius: 12rpx;
  638. padding: 24rpx 20rpx;
  639. box-sizing: border-box;
  640. border: 1rpx solid #F83224;
  641. }
  642. .transport {
  643. width: 702rpx;
  644. height: 164rpx;
  645. background: #FFFFFF;
  646. border-radius: 12rpx;
  647. padding: 24rpx 20rpx;
  648. box-sizing: border-box;
  649. }
  650. .nextto {
  651. width: 702rpx;
  652. height: 84rpx;
  653. background: #F83224;
  654. border-radius: 44rpx;
  655. font-family: PingFangSC, PingFang SC;
  656. font-weight: 500;
  657. font-size: 32rpx;
  658. color: #FFFFFF;
  659. line-height: 84rpx;
  660. text-align: center;
  661. font-style: normal;
  662. margin-top: 108rpx;
  663. }
  664. .logname {
  665. font-family: PingFangSC, PingFang SC;
  666. font-weight: 400;
  667. font-size: 28rpx;
  668. color: #333333;
  669. line-height: 40rpx;
  670. text-align: right;
  671. font-style: normal;
  672. overflow: hidden;
  673. width: 220rpx;
  674. white-space: nowrap;
  675. text-overflow: ellipsis;
  676. text-align: center;
  677. word-break: break-all;
  678. }
  679. .wei {
  680. font-family: JDZhengHT, JDZhengHT;
  681. font-weight: 400;
  682. font-size: 32rpx;
  683. color: #F83224;
  684. line-height: 40rpx;
  685. text-align: right;
  686. font-style: normal;
  687. margin-top: 8rpx;
  688. }
  689. .active {
  690. width: 218rpx;
  691. height: 148rpx;
  692. background: rgba(247, 50, 36, 0.05);
  693. border-radius: 8rpx;
  694. border: 1rpx solid #F83224;
  695. }
  696. .unactive {
  697. width: 218rpx;
  698. height: 148rpx;
  699. border-radius: 12rpx;
  700. border: 1rpx solid #C3C3C3;
  701. }
  702. .poptitle {
  703. width: 142rpx;
  704. height: 50rpx;
  705. font-family: PingFangSC, PingFang SC;
  706. font-weight: 600;
  707. font-size: 36rpx;
  708. color: #333333;
  709. text-align: center;
  710. width: 100%;
  711. }
  712. .back {
  713. background: rgba(244, 244, 244, 1);
  714. padding: 20rpx 24rpx;
  715. box-sizing: border-box;
  716. .btn {
  717. width: 750rpx;
  718. height: 166rpx;
  719. background: #FFFFFF;
  720. box-shadow: 0rpx -1rpx 0rpx 0rpx rgba(0, 0, 0, 0.05);
  721. position: fixed;
  722. bottom: 0;
  723. left: 0;
  724. padding: 0 24rpx 5rpx 5rpx;
  725. box-sizing: border-box;
  726. .money {
  727. font-family: HarmonyOS_Sans_Medium;
  728. font-size: 48rpx;
  729. color: #F83224;
  730. line-height: 38rpx;
  731. text-align: left;
  732. font-style: normal;
  733. // font-weight: 500;
  734. font-weight: bold;
  735. }
  736. .kg {
  737. font-family: PingFangSC, PingFang SC;
  738. font-weight: 400;
  739. font-size: 24rpx;
  740. color: #333333;
  741. line-height: 34rpx;
  742. text-align: left;
  743. font-style: normal;
  744. }
  745. .order {
  746. width: 232rpx;
  747. height: 80rpx;
  748. background: #F83224;
  749. border-radius: 40rpx;
  750. font-family: PingFangTC, PingFangTC;
  751. font-weight: 500;
  752. font-size: 32rpx;
  753. color: #FFFFFF;
  754. line-height: 80rpx;
  755. text-align: center;
  756. font-style: normal;
  757. margin-left: 20rpx;
  758. }
  759. }
  760. //商品相关
  761. .abount {
  762. padding: 28rpx 24rpx;
  763. box-sizing: border-box;
  764. background: #FFFFFF;
  765. border-radius: 16rpx;
  766. width: 702rpx;
  767. .zong {
  768. width: 654rpx;
  769. padding: 22rpx 0 0 0;
  770. border-top: 2rpx solid rgba(151, 151, 151, 0.1);
  771. margin-top: 32rpx;
  772. .small {
  773. font-family: PingFangTC, PingFangTC;
  774. font-weight: 400;
  775. font-size: 24rpx;
  776. color: #444444;
  777. line-height: 34rpx;
  778. text-align: left;
  779. font-style: normal;
  780. }
  781. .mon {
  782. font-family: HarmonyOS_Sans_Medium;
  783. font-size: 28rpx;
  784. color: #F83224;
  785. line-height: 38rpx;
  786. text-align: left;
  787. font-style: normal;
  788. margin-left: 12rpx;
  789. font-weight: bold;
  790. }
  791. }
  792. .back {
  793. background: rgba(244, 244, 244, 1);
  794. padding: 22rpx 16rpx;
  795. box-sizing: border-box;
  796. margin-top: 10rpx;
  797. // margin-bottom: 20rpx;
  798. }
  799. .name {
  800. font-family: PingFangSC, PingFang SC;
  801. font-weight: 400;
  802. font-size: 28rpx;
  803. color: #333333;
  804. line-height: 40rpx;
  805. text-align: left;
  806. font-style: normal;
  807. }
  808. .money {
  809. font-family: HarmonyOS_Sans_Medium;
  810. font-size: 28rpx;
  811. color: #222222;
  812. line-height: 38rpx;
  813. text-align: left;
  814. font-style: normal;
  815. font-weight: 600;
  816. }
  817. }
  818. .recommend {
  819. margin-top: 20rpx;
  820. .title {
  821. font-family: PingFangSC, PingFang SC;
  822. font-weight: 400;
  823. font-size: 22rpx;
  824. color: #222222;
  825. line-height: 32rpx;
  826. text-align: left;
  827. font-style: normal;
  828. width: 148rpx;
  829. height: 64rpx;
  830. overflow: hidden;
  831. text-overflow: ellipsis;
  832. -webkit-line-clamp: 2;
  833. display: -webkit-box;
  834. -webkit-box-orient: vertical;
  835. word-break: break-all;
  836. }
  837. .top {
  838. width: 702rpx;
  839. height: 64rpx;
  840. background: linear-gradient(180deg, #FFE7E3 0%, rgba(255, 255, 255, 1) 100%);
  841. border-radius: 16rpx 16rpx 0 0;
  842. padding: 24rpx 22rpx;
  843. box-sizing: border-box;
  844. }
  845. .bottom {
  846. padding: 0 20rpx 22rpx;
  847. box-sizing: border-box;
  848. background: #fff;
  849. }
  850. }
  851. //物流
  852. .logistics {
  853. width: 702rpx;
  854. // height: 96rpx;
  855. background: #FFFFFF;
  856. border-radius: 16rpx;
  857. padding: 28rpx 22rpx;
  858. box-sizing: border-box;
  859. margin-top: 20rpx;
  860. .change {
  861. font-family: PingFangSC, PingFang SC;
  862. font-weight: 400;
  863. font-size: 28rpx;
  864. color: #F83224;
  865. line-height: 40rpx;
  866. text-align: left;
  867. font-style: normal;
  868. margin-right: 8rpx;
  869. }
  870. }
  871. //商城
  872. .shop {
  873. width: 702rpx;
  874. // height: 322rpx;
  875. background: #FFFFFF;
  876. border-radius: 16rpx;
  877. padding: 30rpx 24rpx;
  878. margin-top: 20rpx;
  879. box-sizing: border-box;
  880. .bu {
  881. width: 120rpx;
  882. height: 40rpx;
  883. border-radius: 20rpx;
  884. border: 1rpx solid rgba(151, 151, 151, 0.3);
  885. }
  886. .money {
  887. font-family: HarmonyOS_Sans_Medium;
  888. font-size: 24rpx;
  889. color: #F83224;
  890. line-height: 34rpx;
  891. text-align: left;
  892. font-style: normal;
  893. font-weight: 600;
  894. }
  895. .name {
  896. font-family: PingFangSC, PingFang SC;
  897. font-weight: 400;
  898. font-size: 30rpx;
  899. color: #222222;
  900. line-height: 42rpx;
  901. text-align: left;
  902. font-style: normal;
  903. margin-left: 10rpx;
  904. }
  905. .weight {
  906. font-family: PingFangSC, PingFang SC;
  907. font-weight: 400;
  908. font-size: 24rpx;
  909. color: rgba(34, 34, 34, 0.6);
  910. line-height: 34rpx;
  911. text-align: left;
  912. font-style: normal;
  913. margin-top: 16rpx;
  914. }
  915. }
  916. // 地址
  917. .address {
  918. width: 702rpx;
  919. // height: 182rpx;
  920. background: #FFFFFF;
  921. border-radius: 16rpx;
  922. padding: 32rpx 24rpx;
  923. box-sizing: border-box;
  924. .add {
  925. font-family: SFPro, SFPro;
  926. font-weight: 500;
  927. font-size: 32rpx;
  928. color: #222222;
  929. line-height: 36rpx;
  930. text-align: left;
  931. font-style: normal;
  932. }
  933. .info {
  934. font-family: SFPro, SFPro;
  935. font-weight: 400;
  936. font-size: 24rpx;
  937. color: #555555;
  938. line-height: 28rpx;
  939. text-align: left;
  940. font-style: normal;
  941. margin-top: 20rpx;
  942. }
  943. }
  944. }
  945. .minus {
  946. width: 22px;
  947. height: 22px;
  948. border-width: 1px;
  949. border-color: #E6E6E6;
  950. border-style: solid;
  951. border-top-left-radius: 100px;
  952. border-top-right-radius: 100px;
  953. border-bottom-left-radius: 100px;
  954. border-bottom-right-radius: 100px;
  955. @include flex;
  956. justify-content: center;
  957. align-items: center;
  958. }
  959. .input {
  960. padding: 0 10px;
  961. }
  962. .plus {
  963. width: 22px;
  964. height: 22px;
  965. background-color: #FF0000;
  966. border-radius: 50%;
  967. /* #ifndef APP-NVUE */
  968. display: flex;
  969. /* #endif */
  970. justify-content: center;
  971. align-items: center;
  972. }
  973. </style>