order.vue 28 KB

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