1 line
23 KiB
Plaintext
1 line
23 KiB
Plaintext
{"version":3,"sources":["uni-app:///main.js","webpack:///D:/chenq/chen/uniapp(兼小程序)/dengrui/pagesA/confirmOrder/confirmOrder.vue?5282","webpack:///D:/chenq/chen/uniapp(兼小程序)/dengrui/pagesA/confirmOrder/confirmOrder.vue?7e4b","webpack:///D:/chenq/chen/uniapp(兼小程序)/dengrui/pagesA/confirmOrder/confirmOrder.vue?3cf1","webpack:///D:/chenq/chen/uniapp(兼小程序)/dengrui/pagesA/confirmOrder/confirmOrder.vue?6b8f","uni-app:///pagesA/confirmOrder/confirmOrder.vue"],"names":["createPage","Page"],"mappings":";;;;;;;;;;kDAAA;AACA;AACA,kH;AACAA,UAAU,CAACC,qBAAD,CAAV,C;;;;;;;;;;;;;ACHA;AAAA;AAAA;AAAA;AAAA;AAAyH;AACzH;AACgE;AACL;;;AAG3D;AACmL;AACnL,gBAAgB,uLAAU;AAC1B,EAAE,kFAAM;AACR,EAAE,uFAAM;AACR,EAAE,gGAAe;AACjB;AACA;AACA;AACA;AACA;AACA,EAAE,2FAAU;AACZ;AACA;;AAEA;AACe,gF;;;;;;;;;;;;ACtBf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;;;;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACbA;AAAA;AAAA;AAAA;AAAyrB,CAAgB,wqBAAG,EAAC,C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACiF7sB;AACA;AACA,4BADA,EADA;;AAIA,MAJA,kBAIA;AACA;AACA;AACA,+CADA;AAEA,sEAFA;AAGA,8CAHA;AAIA,+CAJA;AAKA,2CALA,CADA;;AAQA,iBARA;AASA,kBATA;AAUA,iBAVA;AAWA,mBAXA;AAYA,qBAZA;AAaA,eAbA;AAcA,iBAdA;AAeA,qBAfA;AAgBA,oBAhBA;AAiBA,sBAjBA,EAiBA;AACA,cAlBA,EAkBA;AACA,mBAnBA,EAmBA;AACA,aApBA;AAqBA,6BArBA;AAsBA,iBAtBA;AAuBA,kBAvBA;AAwBA,qBAxBA;AAyBA,gBAzBA,EAyBA;AACA,sBA1BA,EA0BA;AACA,mBA3BA,EA2BA;AACA,kBA5BA;AA6BA,gBA7BA;AA8BA,kBA9BA;AA+BA,qBA/BA;AAgCA,gDAhCA;;AAkCA,GAvCA;AAwCA,UAxCA,sBAwCA;AACA;AACA,GA1CA;AA2CA,QA3CA,oBA2CA;AACA;AACA,wBAFA,CAEA;AACA,GA9CA;AA+CA,QA/CA,kBA+CA,MA/CA,EA+CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BADA;AAEA,mBAFA;AAGA,iDAHA;AAIA,qBAJA;AAKA,2CALA;AAMA,yBANA;AAOA,+BAPA;AAQA,uCARA;AASA,2BATA;AAUA,+BAVA;AAWA,yBAXA;AAYA,iCAZA;;AAcA;AACA,KAhBA;AAiBA;AACA;AACA,gCADA;AAEA,sBAFA;;AAIA;AACA,KANA;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;;AAEA,GA3GA;AA4GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAhBA,0BAgBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAJA;AAKA;AACA;AACA;AACA,OAbA,EAaA,mBAbA;AAcA,KA/BA;AAgCA,WAhCA,qBAgCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCADA;AAEA,kCAFA;AAGA,yCAHA;AAIA,qDAJA;AAKA,0CALA;AAMA,sDANA;AAOA,yCAPA;AAQA,4CARA;AASA,+BATA,CASA;AATA;AAWA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCADA;AAEA,yDAFA,EAEA;AACA,iEAHA,EAGA;AACA,+DAJA,EAIA;AACA,6DALA,EAKA;AACA,+DANA,EAMA;AACA,0DAPA,EAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAFA,EAEA,mBAFA;AAGA,iBAlBA;AAmBA;AACA;AACA;AACA;AACA,iBAvBA;;AAyBA,aA1BA,MA0BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAFA,EAEA,mBAFA;AAGA;;AAEA;AACA,SA3CA,EA2CA,mBA3CA;AA4CA,OA9DA,MA8DA;AACA;AACA;AACA;AACA,SAFA,EAEA,GAFA;AAGA;AACA,KAvGA;AAwGA,cAxGA,wBAwGA;AACA;AACA,KA1GA;AA2GA,YA3GA,oBA2GA,KA3GA,EA2GA;AACA;AACA;AACA,KA9GA;AA+GA,iBA/GA,2BA+GA;AACA;AACA,0DADA;;AAGA,KAnHA;AAoHA,WApHA,mBAoHA,CApHA,EAoHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KA/HA;AAgIA,UAhIA,oBAgIA;AACA;AACA;AACA;AACA,OAFA,MAEA;AACA;AACA;AACA;AACA,SAFA,MAEA;AACA;AACA;AACA;AACA;AACA,SAFA,MAEA;AACA;AACA;AACA;AACA;AACA,KAlJA,EA5GA,E","file":"pagesA/confirmOrder/confirmOrder.js","sourcesContent":["import 'uni-pages';\nimport Vue from 'vue'\nimport Page from './pagesA/confirmOrder/confirmOrder.vue'\ncreatePage(Page)","import { render, staticRenderFns, recyclableRender, components } from \"./confirmOrder.vue?vue&type=template&id=128872eb&\"\nvar renderjs\nimport script from \"./confirmOrder.vue?vue&type=script&lang=js&\"\nexport * from \"./confirmOrder.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null,\n false,\n components,\n renderjs\n)\n\ncomponent.options.__file = \"pagesA/confirmOrder/confirmOrder.vue\"\nexport default component.exports","export * from \"-!../../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--16-0!../../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!../../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!../../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./confirmOrder.vue?vue&type=template&id=128872eb&\"","var components\nvar render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n if (!_vm._isMounted) {\n _vm.e0 = function($event) {\n _vm.isBtn = false\n }\n }\n}\nvar recyclableRender = false\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns, recyclableRender, components }","import mod from \"-!../../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--12-1!../../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./confirmOrder.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--12-1!../../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./confirmOrder.vue?vue&type=script&lang=js&\"","<template>\n <view class=\"\">\n <!-- 使用标题栏 -->\r\n <status-nav :statusBackw=\"true\" :statusTitle=\"true\" :whereCome=\"whereCome\" :title-val=\"'订单确认'\" :tabcolor=\"'#ffffff'\"></status-nav>\r\n <!-- 地址信息 -->\r\n <view @tap=\"chooseAddress\" class=\" bacb disba padding-zy30 posir\" :style=\"{paddingTop:(statusHNH+10)+'px'}\" v-if=\"listAddress!=null\">\r\n <view class=\"margin-sx40\">\r\n <view class=\"fon28 color33 disac\">\r\n <view v-if=\"listAddress.is_default==1\" class=\"fon24 colorb margin-y20 btnaddress\" style=\"background-color: #e91111;\">默认</view>\r\n <!-- <view class=\"fon24 colorb margin-y20 btnaddress\" style=\"background-color: #ffc600;\">公司</view> -->\r\n {{listAddress.province_str}} {{listAddress.city_str}} {{listAddress.county_str}} \r\n </view>\r\n <view class=\"fon36 bold margin-sx20\">{{listAddress.address}}</view>\r\n <view class=\"fon28 color33\">{{listAddress.name}} {{listAddress.phone}}</view>\r\n </view>\r\n <image class=\"youj\" src=\"/static/img/my/youj.png\" mode=\"\"></image>\r\n <image class=\"posia lanh\" src=\"/static/img/order/oaddressx.png\" mode=\"\"></image>\r\n </view>\r\n\t\t<view v-if=\"listAddress==null\" @tap=\"chooseAddress\" class=\"ptwo-box konga\">添加地址</view>\r\n <!-- 商品列表 -->\r\n <view class=\"bacb margin-s20 padding-zy30 padding-x30\">\r\n <view class=\"disba borbot padding-sx40\" v-for=\"(itemOr,indexOr) in listInfo\" :key=\"indexOr\">\r\n <image class=\"flexs gouwcimg margin-y20\" :src=\"itemOr.main_image\" mode=\"aspectFill\"></image>\r\n <view>\r\n <view class=\"clips2 fon28\">{{itemOr.spu_name}}</view>\r\n <view class=\"fon24 color9 margin-sx10\">{{itemOr.sub_title}}</view>\r\n <view class=\"disba margin-s20\">\r\n <view class=\"bold colorf78\">¥{{itemOr.price/100}}.0</view>\r\n <view class=\"fon28\">X{{itemOr.num}}</view>\r\n </view>\r\n </view>\r\n </view>\r\n </view>\r\n <!-- 商品下单金额相关与留言 -->\r\n <view class=\"margin-s20 padding-zy30 bacb\">\r\n <view @tap=\"clickfen(index)\" v-for=\"(item,index) in infoArr\" :key=\"index\" class=\"disba padding-s40\">\r\n <view class=\"fon30 color33 flexs\">{{item.title}}</view>\r\n <view v-if=\"item.price!=''\" class=\"disac width100 jcend\">\r\n <view :class=\"index==0?'bold':''\" class=\"fon26 margin-y30\" v-if=\"item.price!=''\"><text :class=\"index==1?'colorf78':''\">¥{{item.price}}</text></view>\r\n <image v-if=\"item.src!=''\" class=\"youj\" :src=\"item.src\" style=\"margin-left: -15rpx;\" mode=\"aspectFill\"></image>\r\n </view>\r\n <input class=\"borbot width100 margin-z20 fon24 padding-sx10\" v-if=\"item.title=='订单备注'\" type=\"text\" v-model=\"orderBZ\" placeholder=\"可以再这里给商家留言(*^▽^*)哟\" placeholder-style=\"color:#9a9a9a;font-size:24rpx;font-weight:bold;\"/>\r\n <view class=\"borbot\"></view>\r\n </view>\r\n <view class=\"bold fon30 padding-sx20 textr\">合计: <text class=\"colorf78 fon36\">¥{{hPrice}}</text></view>\r\n </view>\r\n <view class=\"margin-s20 padding-zy30 color9 fon24 marb-box12 textr\">本单商品可以获得{{percentage}}%的分红金额</view>\r\n <!-- 提交订单 -->\r\n <view class=\"disba bacb padding-sx10 padding-zy30 posi-bzy\" style=\"border-top: 1rpx solid #eeeeee;\">\r\n <view>\r\n <view class=\"fon28\">合计: <text class=\"fon32 bold colorf78\">¥{{hPrice}}</text></view>\r\n <view class=\"fon24\" style=\"color: #353535;\">已使用分红金额¥{{infoArr[1].price}}</view>\r\n </view>\r\n\t\t\t<!-- 发起支付 -->\r\n <button @tap=\"confirm\" :disabled=\"disabled\" class=\"bold btntj\">{{btncon}}</button>\r\n </view>\r\n <!-- 底部弹框 -->\r\n <view @touchmove.stop.prevent=\"\" v-if=\"isBtn\" class=\"posiall zIn5\" style=\"background-color: rgba(0,0,0,.6);\">\r\n <view class=\"posi-bzy padding20 animated bounceInUp\" style=\"border-top-left-radius: 30rpx;border-top-right-radius: 30rpx;background-color: #FFFFFF;z-index: 6;\">\r\n <view class=\"margin-s20 disba\">\r\n <view>分红抵扣</view>\r\n <view @tap=\"isBtn=false\" class=\"close-box\">\r\n <view style=\"transform: rotate(45deg);\"></view>\r\n <view style=\"transform: rotate(-45deg);\"></view>\r\n </view>\r\n </view>\r\n <view class=\"margin-sx20 width94\" style=\"background-color: #f3f3f3;border-radius: 41rpx;\">\r\n <input @input=\"inputev\" :disabled=\"disf\" type=\"number\" class=\"fon24 margin-zy30\" :maxlength=\"len\" style=\"height: 82rpx;\" :value=\"fhprice\" :placeholder=\"placeCon\" />\r\n </view>\r\n <view class=\"fon24 color9\">可用分红金额:¥{{usableAmount}},实际获得金额:¥{{shijPrice}}</view>\r\n <view class=\"disbc\">\r\n <view @tap=\"tankEv\" style=\"height: 86rpx;line-height: 86rpx;background-color: #FF7800;border-radius: 42.5rpx;text-align: center;color: #FFFFFF;font-weight: bold;width: 90%;margin-top: 40rpx;margin-bottom: 60rpx;\">立即使用</view>\r\n </view>\r\n </view>\r\n </view>\r\n <successpopu :isShow=\"isShow\" :isSuccess=\"isSuccess\" :title=\"title\" :content=\"content\" :typeNum=\"typeNum\" @change=\"changepopu\"></successpopu>\r\n </view>\n</template>\n\n<script>\r\n import successpopu from '@/components/successpopu.vue';\n export default {\r\n components:{\r\n successpopu\r\n },\n data() {\n return {\r\n infoArr:[\r\n {title:'商品总额',price:'0.00',src:''},\r\n {title:'分红抵扣',price:'0.00',src:'/static/img/my/youj.png'},\r\n {title:'配送费',price:'0.00',src:''},\r\n {title:'本单分红',price:'0.00',src:''},\r\n {title:'订单备注',price:'',src:''},\r\n ],\r\n orderBZ:'',\r\n isBtn:false,\r\n fhprice:'',\r\n isShow:false,\r\n isSuccess:true,\r\n title:'',\r\n content:'',\r\n disabled:false,\r\n btncon:'确认提交',\r\n usableAmount:'',//可用的分红抵扣金额\r\n\t\t\t\tzBig:'',//最大可抵扣实际金额\r\n\t\t\t\tpercentage:0,//抵扣比例\r\n len:10,\r\n\t\t\t\tplaceCon:'请输入您想要抵扣的金额',\r\n\t\t\t\tdisf:false,\r\n\t\t\t\tlistInfo:[],\r\n\t\t\t\tlistAddress:'',\r\n\t\t\t\thPrice:'',//合计金额\r\n\t\t\t\tshijPrice:'0.0',//实际获得金额\r\n\t\t\t\torderInfo:'',//订单信息\r\n\t\t\t\ttypeNum:'1',\r\n\t\t\t\tlenaddr:0,\r\n\t\t\t\twhereCome:0,\r\n\t\t\t\tnewsku_list:[],\r\n\t\t\t\tstatusHNH:uni.getStorageSync('statusHNH')\r\n }\n },\r\n\t\tonUnload() {\r\n\t\t\tuni.removeStorageSync('isAddr')\r\n\t\t},\r\n\t\tonShow() {\r\n\t\t\tthis.$toolAll.tools.guoq()\r\n\t\t\tthis.checkAddress()// 查询地址\r\n\t\t},\r\n onLoad(option) {\r\n\t\t\t// console.log(this.infoArr[3].price);\r\n\t\t\t// this.checkFHE()\r\n\t\t\tif(option.index!=undefined) this.whereCome = option.index\r\n\t\t\tthis.orderInfo = uni.getStorageSync('orderInfo')\r\n\t\t\t// console.log('订单:',this.orderInfo);\r\n\t\t\tthis.orderInfo.list.forEach(item=>{\r\n\t\t\t\tlet obj = {\r\n\t\t\t\t\tcoding:item.coding,\r\n\t\t\t\t\tid:item.id,\r\n\t\t\t\t\tmain_image:this.$http + item.main_image,\r\n\t\t\t\t\tnum:item.num,\r\n\t\t\t\t\toriginal_price:item.original_price,\r\n\t\t\t\t\tprice:item.price,\r\n\t\t\t\t\tsku_name:item.sku_name,\r\n\t\t\t\t\tspec_summary:item.spec_summary,\r\n\t\t\t\t\tspu_id:item.spu_id,\r\n\t\t\t\t\tspu_name:item.spu_name,\r\n\t\t\t\t\tstock:item.stock,\r\n\t\t\t\t\tsub_title:item.sub_title\r\n\t\t\t\t}\r\n\t\t\t\tthis.listInfo.push(obj)\r\n\t\t\t})\r\n\t\t\tthis.listInfo.forEach(iteml=>{\r\n\t\t\t\tlet nskObj = {\r\n\t\t\t\t\tsku_coding: iteml.coding,\r\n\t\t\t\t\tnum: iteml.num\r\n\t\t\t\t}\r\n\t\t\t\tthis.newsku_list.push(nskObj)\r\n\t\t\t})\r\n\t\t\t// console.log('参数',this.orderInfo);\r\n\t\t\t//商品总额\r\n\t\t\tthis.infoArr[0].price = (this.orderInfo.original_total/100).toFixed(2)\r\n\t\t\t//运费\r\n\t\t\tthis.infoArr[2].price = (this.orderInfo.freight/100).toFixed(2)\r\n\t\t\t//可用分红额度\r\n\t\t\tthis.usableAmount = (this.orderInfo.bonus_amount/100).toFixed(2)\r\n\t\t\tif(this.usableAmount==0){\r\n\t\t\t\tthis.placeCon = '暂无可用分红金额'\r\n\t\t\t\tthis.disf = true\r\n\t\t\t}\r\n\t\t\t//抵扣比例\r\n\t\t\tthis.percentage = this.orderInfo.bonus_rate\r\n\t\t\t// 实际金额\r\n\t\t\t// console.log('总金额+运费=',this.infoArr[0].price*1 + this.infoArr[2].price*1);//没问题\r\n\t\t\t\r\n\t\t\tthis.hPrice = this.infoArr[0].price*1 + this.infoArr[2].price*1 - this.infoArr[1].price*1\r\n\t\t\t// 本单分红\r\n\t\t\tthis.infoArr[3].price = (this.hPrice * (this.percentage/100)).toFixed(2)\r\n\t\t\t// 实际获得金额\r\n\t\t\t// this.shijPrice = (this.orderInfo.bonus_amount * this.orderInfo.deduction_rate/100).toFixed(2)\r\n\t\t\t// 地址\r\n\t\t\tthis.listAddress = this.orderInfo.address\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tlet getisAddr = uni.getStorageSync('isAddr')\r\n\t\t\tif(getisAddr!='') this.listAddress = getisAddr\r\n\t\t\t\r\n\t\t\t// console.log(this.listAddress);\r\n\t\t\t\r\n },\r\n methods: {\r\n\t\t\t// checkFHE(){//查询可用分红额度\r\n\t\t\t// \tthis.$requst.post('order/bonus-info').then(res=>{\r\n\t\t\t// \t\tif(res.code==0){\r\n\t\t\t// \t\t\tthis.usableAmount = res.data.bonus\r\n\t\t\t// \t\t\tthis.percentage = res.data.bonus_deduction_rate\r\n\t\t\t// \t\t\tif(this.usableAmount==0){\r\n\t\t\t// \t\t\t\tthis.placeCon = '暂无可用分红金额'\r\n\t\t\t// \t\t\t\tthis.disf = true\r\n\t\t\t// \t\t\t}\r\n\t\t\t// \t\t\tthis.infoArr[3].price = this.infoArr[0].price*(this.percentage/100)\r\n\t\t\t// \t\t\t// console.log(this.infoArr);\r\n\t\t\t// \t\t}\r\n\t\t\t// \t\t// console.log(res);\r\n\t\t\t// \t},error=>{})\r\n\t\t\t// },\r\n\t\t\tcheckAddress(){//查询地址列表事件\r\n\t\t\t\tthis.$requst.post('user/address').then(res=>{\r\n\t\t\t\t\tif(res.code==0){\r\n\t\t\t\t\t\tthis.lenaddr = res.data.length\r\n\t\t\t\t\t\tif(this.listAddress==''){\r\n\t\t\t\t\t\t\tif(this.lenaddr!=0){\r\n\t\t\t\t\t\t\t\tres.data.forEach(item=>{\r\n\t\t\t\t\t\t\t\t\tif(item.is_default==1){\r\n\t\t\t\t\t\t\t\t\t\tthis.listAddress = item\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t})\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t},error=>{})\r\n\t\t\t},\r\n confirm(){//提交订单事件\r\n\t\t\t\tlet ya = this\r\n\t\t\t\t// console.log(this.listAddress);\r\n\t\t\t\tif(this.lenaddr!=0){\r\n\t\t\t\t\tthis.disabled = true\r\n\t\t\t\t\tthis.btncon = '正在提交...'\r\n\t\t\t\t\t// console.log('数据:',this.orderInfo);\r\n\t\t\t\t\t// console.log('订单参数:',this.newsku_list);\r\n\t\t\t\t\tlet orderObj = {\r\n\t\t\t\t\t\tsku_list: this.newsku_list,\r\n\t\t\t\t\t\ttotal: this.hPrice*100,\r\n\t\t\t\t\t\taddress_id: this.listAddress.id,\r\n\t\t\t\t\t\toriginal_total: this.infoArr[0].price*100,\r\n\t\t\t\t\t\tbonus_amount: this.fhprice*100,\r\n\t\t\t\t\t\tbonus_deduction: this.infoArr[1].price*100,\r\n\t\t\t\t\t\tfreight: this.orderInfo.freight,\r\n\t\t\t\t\t\tbonus: this.infoArr[3].price*100,\r\n\t\t\t\t\t\tremarks: this.orderBZ//买家备注\r\n\t\t\t\t\t}\r\n\t\t\t\t\tconsole.log('创建订单参数',orderObj);\r\n\t\t\t\t\t// console.log('随机数',this.$toolAll.tools.randomStr());\r\n\t\t\t\t\tthis.$requst.post('order/create',orderObj).then(res=>{\r\n\t\t\t\t\t\t// console.log('调起结果',res);\r\n\t\t\t\t\t\tlet dataInfo = res\r\n\t\t\t\t\t\tif(res.code==0){\r\n\t\t\t\t\t\t\tif(dataInfo.data.needPay){\r\n\t\t\t\t\t\t\t\tuni.requestPayment({\r\n\t\t\t\t\t\t\t\t\tprovider: 'wxpay',\r\n\t\t\t\t\t\t\t\t\tappId:dataInfo.data.payment_params.appId,//appId\r\n\t\t\t\t\t\t\t\t\ttimeStamp: dataInfo.data.payment_params.timeStamp,//时间戳\r\n\t\t\t\t\t\t\t\t\tnonceStr: dataInfo.data.payment_params.nonceStr,//随机字符串\r\n\t\t\t\t\t\t\t\t\tpackage: dataInfo.data.payment_params.package,//package\r\n\t\t\t\t\t\t\t\t\tsignType: dataInfo.data.payment_params.signType,//MD5\r\n\t\t\t\t\t\t\t\t\tpaySign: dataInfo.data.payment_params.sign,//签名\r\n\t\t\t\t\t\t\t\t\tsuccess:(res)=> {\r\n\t\t\t\t\t\t\t\t\t\tthis.btncon = '确认提交'\r\n\t\t\t\t\t\t\t\t\t\tthis.isShow = true\r\n\t\t\t\t\t\t\t\t\t\tthis.isSuccess = true\r\n\t\t\t\t\t\t\t\t\t\tthis.title = '恭喜你,购买成功'\r\n\t\t\t\t\t\t\t\t\t\tthis.content = '可以在个人中心--我的订单查看订单详情'\r\n\t\t\t\t\t\t\t\t\t\t// console.log('success:' + JSON.stringify(res));\r\n\t\t\t\t\t\t\t\t\t\tthis.$requst.post('order/paid',{order_id:dataInfo.data.order_id}).then(result=>{\r\n\t\t\t\t\t\t\t\t\t\t\t// console.log('成功通知',result);\r\n\t\t\t\t\t\t\t\t\t\t},error=>{})\r\n\t\t\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\t\t\tfail: (err)=> {\r\n\t\t\t\t\t\t\t\t\t\t// console.log('fail:' + JSON.stringify(err));\r\n\t\t\t\t\t\t\t\t\t\tthis.disabled = false\r\n\t\t\t\t\t\t\t\t\t\tthis.btncon = '确认提交'\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tthis.btncon = '确认提交'\r\n\t\t\t\t\t\t\t\tthis.isShow = true\r\n\t\t\t\t\t\t\t\tthis.isSuccess = true\r\n\t\t\t\t\t\t\t\tthis.title = '恭喜你,购买成功'\r\n\t\t\t\t\t\t\t\tthis.content = '可以在个人中心--我的订单查看订单详情'\r\n\t\t\t\t\t\t\t\t// console.log('success:' + JSON.stringify(res));\r\n\t\t\t\t\t\t\t\tthis.$requst.post('order/paid',{order_id:dataInfo.data.order_id}).then(result=>{\r\n\t\t\t\t\t\t\t\t\t// console.log('成功通知',result);\r\n\t\t\t\t\t\t\t\t},error=>{})\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t},error=>{})\r\n\t\t\t\t}else {\r\n\t\t\t\t\tthis.$toolAll.tools.showToast('请先完善地址信息')\r\n\t\t\t\t\tsetTimeout(function(){\r\n\t\t\t\t\t\tya.chooseAddress()\r\n\t\t\t\t\t},500)\r\n\t\t\t\t}\r\n },\r\n changepopu(){\r\n this.isShow = false\r\n },\n clickfen(index){\r\n\t\t\t\tif(index==1){this.fhprice=''}\r\n index==1?this.isBtn = true : this.isBtn = false\r\n },\r\n chooseAddress(){\r\n uni.navigateTo({\r\n url:'/pagesB/adManagement/adManagement?isOrder=0'\r\n })\r\n },\r\n inputev(e){//分红金额输入框\r\n let val = e.target.value\r\n let ya =this\r\n let result = this.$toolAll.tools.checkPrice(val,ya.usableAmount)\r\n ya.len = result.len;\r\n ya.fhprice = result.val\r\n\t\t\t\t// if(ya.fhprice>=100){\r\n\t\t\t\t\tya.shijPrice = (ya.fhprice * ya.orderInfo.deduction_rate/100).toFixed(2)\r\n\t\t\t\t// } else {\r\n\t\t\t\t// \tya.shijPrice = (ya.fhprice * ya.orderInfo.deduction_rate/100).toFixed(2)\r\n\t\t\t\t// }\r\n },\r\n\t\t\ttankEv(){//立即使用事件\r\n\t\t\t\tif(this.shijPrice==''){this.shijPrice = '0.0'}\r\n\t\t\t\tif(this.fhprice<100){\r\n\t\t\t\t\tthis.$toolAll.tools.showToast('抵扣金额最低 100')\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthis.infoArr[1].price = this.shijPrice\r\n\t\t\t\t\tif((this.infoArr[0].price - this.shijPrice)<=0){\r\n\t\t\t\t\t\tthis.hPrice = 0\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tthis.hPrice = this.infoArr[0].price - this.shijPrice\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif((this.hPrice * this.percentage/100)==0){\r\n\t\t\t\t\t\tthis.infoArr[3].price = '0.00'\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tthis.infoArr[3].price = this.hPrice * this.percentage/100\r\n\t\t\t\t\t}\r\n\t\t\t\t\tthis.isBtn = false\r\n\t\t\t\t}\r\n\t\t\t}\r\n }\n }\n</script>\n\n<style>\n</style>\n"],"sourceRoot":""} |