diff --git a/rc-busness/ajax/getData.js b/rc-busness/ajax/getData.js index 0c1a5e5d..b7300477 100644 --- a/rc-busness/ajax/getData.js +++ b/rc-busness/ajax/getData.js @@ -31,13 +31,13 @@ export const courselist = (offset, courseId, type, sort, selectScreen = []) => { courseId, selectScreenStr } - return fetch( '/api/courselist', data) + return fetch('/api/courselist', data) } /** * 获取课程详情 */ export const getDetail = (id) => { - fetch( '/api/courseDetail/index/' + id) + fetch('/api/courseDetail/index/' + id) } /** @@ -56,44 +56,40 @@ export const getleckCourse = (name, offset) => { * 加入购物车 */ -export const postCourseId = (productCode,buyCount,memberId, mobile,productImg,productName,productPrice,specifications) => { +export const postCourseId = (productCode, buyCount, memberId, mobile, productImg, productName, productPrice, specifications) => { var data = { - buyCount:buyCount, + buyCount: buyCount, memberId: memberId, - mobile:mobile, - productCode:productCode, + mobile: mobile, + productCode: productCode, productImg: productImg, - productName:productName, - productPrice:productPrice, - specifications:specifications + productName: productName, + productPrice: productPrice, + specifications: specifications } - return fetch('/insertCartProductInfo', data,'POST') + return fetch('/insertCartProductInfo', data, 'POST') } /** * 是否存在购物车 */ - export const isexistCart = (id, pet,address) => { +export const isexistCart = (id) => { var data = { - memberId: id, + } - return fetch('getCartProductInfo?memberId='+id,data,'POST') + return fetch('getCartProductInfo', data, 'POST') } /** * 删除购物车 */ export const deleteCart = (memberId, productCode) => { - var data = { - memberId: memberId, - productCode:productCode - } - return fetch('cancelCartProductInfo',data,'POST') + return fetch('cancelCartProductInfo?memberId=' + memberId, productCode, 'POST') } /** * 购物车批量提交 */ export const mostAddClass = (id) => { - return fetch('/api/mostAddClass/', {id}) + return fetch('/api/mostAddClass/', { id }) } /** * 删除购物车 @@ -109,47 +105,47 @@ export const mostAddClass = (id) => { /** * 发送验证码 */ - export const sendMsg = (mobile, pet,address) => { +export const sendMsg = (mobile, pet, address) => { var data = { - phoneNumber:mobile, + phoneNumber: mobile, } - return fetch('sendMsg', data, 'POST' ) + return fetch('sendMsg', data, 'POST') } /** * 发送验证码数据 */ - export const vadatnmsg = (msgNum,hash,tamp) => { +export const vadatnmsg = (msgNum, hash, tamp) => { var data = { - msgNum:msgNum, - tamp:tamp, - hash:hash + msgNum: msgNum, + tamp: tamp, + hash: hash } - return fetch('validateNum', data, 'POST' ) + return fetch('validateNum', data, 'POST') } /** * 筛选标签 */ - export const userstype = (stype, pet,address) => { +export const userstype = (stype, pet, address) => { var data = { - petType:0, + petType: 0, } - return fetch('productSearchTag/query?petType=' + 0, data, 'POST' ) + return fetch('productSearchTag/query?petType=' + 0, data, 'POST') } /** * 登录 */ -export const userLongin = (mobile, pet,address) => { +export const userLongin = (mobile, pet, address) => { var data = { - id:'', - mobile:mobile, + id: '', + mobile: mobile, } - return fetch('member?type=get', data, 'POST' ) + return fetch('member?type=get', data, 'POST') } - //注册 -export const useredit = (mobile, pet,address) => { +//注册 +export const useredit = (mobile, pet, address) => { var data = { mobile:mobile, memberName:'', @@ -184,10 +180,10 @@ export const userquery = (stype) => { console.log(stype); var data = { - goodsName:stype + goodsName: stype } - return fetch('goods?goodsName='+stype, data, 'POST' ) + return fetch('goods?goodsName=' + stype, data, 'POST') } //商品全部信息 export const userque = (stype) => { @@ -195,7 +191,7 @@ export const userque = (stype) => { console.log(stype); var data = { } - return fetch('goods', data, 'POST' ) + return fetch('goods', data, 'POST') } @@ -234,20 +230,14 @@ export const searchchanpin = (stype,usertype,curPage,curRow) => { curRow=10; let queryTail='&page='+curPage+'&rows='+curRow; console.log(stype); - let list={}; - stype.map(item=>{ + let list = {}; + stype.map(item => { console.log(item); list=item }) var str = "&"; for(var key in list){ - - str = str + key + "=" + list[key] + "&"; - } - str = str.substr(0,str.length-1); - var data = { - page:1, - row:10 + str = str + key + "=" + list[key] + "&"; } return fetch('product/query?petType='+usertype+str+queryTail, data, 'POST' ) @@ -265,19 +255,19 @@ export const searchchanpin = (stype,usertype,curPage,curRow) => { //查询订单 -export const userindent = (phoneNumber,orderNumber,) => { - var data = { - phoneNumber:'18112621098', - orderNumber:orderNumber, +export const userindent = (phoneNumber, orderNumber,) => { + var data = { + phoneNumber: '18112621098', + orderNumber: orderNumber, } - return fetch('orderMaster/?type=query', data, 'POST' ) + return fetch('orderMaster/?type=query', data, 'POST') } //查询订单详情 export const userin = (orderNumber,) => { - var data = { - orderNumber:orderNumber, + var data = { + orderNumber: orderNumber, } - return fetch('orderMaster/?type=query', data, 'POST' ) + return fetch('orderMaster/?type=query', data, 'POST') } @@ -285,21 +275,21 @@ export const userin = (orderNumber,) => { //取消订单 export const canceldanhao = (orderNumber) => { var data = { - - orderNumber:orderNumber, + + orderNumber: orderNumber, } - return fetch('cancelOrder/', data, 'POST' ) + return fetch('cancelOrder/', data, 'POST') } export const biaomessa = (stype) => { console.log(stype); var data = { - name:stype, - page:1, - row:10 + name: stype, + page: 1, + row: 10 } - return fetch('product/query', data, 'POST' ) + return fetch('product/query', data, 'POST') } export const biaome = (usertype,stype,curPage,rows) => { @@ -311,9 +301,9 @@ export const biaome = (usertype,stype,curPage,rows) => { let username='&name='+stype console.log(stype); var data = { - name:stype, - rows:10, - page:1, + name: stype, + rows: 10, + page: 1, } return fetch('product/query?petType='+usertype+username+queryTail,data, 'POST' ) } @@ -324,9 +314,9 @@ export const biaome = (usertype,stype,curPage,rows) => { export const memberAccount = (stype) => { console.log(stype); var data = { - memberId:stype + memberId: stype } - return fetch('memberAccount?type=history', data, 'POST' ) + return fetch('memberAccount?type=history', data, 'POST') } @@ -334,20 +324,20 @@ export const memberAccount = (stype) => { export const ordermaster = (stype) => { console.log(stype); var data = { - - memberId:'223782' + + memberId: '223782' } - return fetch('memberAccount', data, 'POST' ) + return fetch('memberAccount', data, 'POST') } //微信支付 export const payOrderWX = (stype) => { console.log(stype); var data = { - - memberId:'223782' + + memberId: '223782' } - return fetch('memberAccount', data, 'POST' ) + return fetch('memberAccount', data, 'POST') } @@ -356,9 +346,9 @@ export const payOrderWX = (stype) => { export const insercar = (stype) => { console.log(stype); var data = { - petType:stype + petType: stype } - return fetch('product/insertCartProductInfo', data, 'POST' ) + return fetch('product/insertCartProductInfo', data, 'POST') } @@ -366,25 +356,25 @@ export const insercar = (stype) => { //查询猫狗商品信息 -export const catquery = (productCode,type) => { +export const catquery = (productCode, type) => { console.log(productCode); var data = { - - petType:0 + + petType: 0 } - return fetch('h5/product/query', data, 'POST' ) + return fetch('h5/product/query', data, 'POST') } //查询猫狗商品信息 -export const dogquery = (productCode,type) => { +export const dogquery = (productCode, type) => { console.log(productCode); var data = { - - petType:1, - pet_type:0 + + petType: 1, + pet_type: 0 } - return fetch('h5/product/query', data, 'POST' ) + return fetch('h5/product/query', data, 'POST') } @@ -395,11 +385,11 @@ export const dogquery = (productCode,type) => { export const oncequery = (productCode) => { var data = { - - productCode:productCode + + productCode: productCode } - return fetch( "goodsByProductCode?productCode="+productCode, data, 'POST' ) + return fetch("goodsByProductCode?productCode=" + productCode, data, 'POST') } @@ -407,163 +397,173 @@ export const oncequery = (productCode) => { export const goodsmessage = (productCode) => { var data = { - productCode:productCode + productCode: productCode } - return fetch( "productMaster/query?productCode="+productCode, data, 'POST' ) + return fetch("productMaster/query?productCode=" + productCode, data, 'POST') } - //优惠券的插入 - export const inserdiscount = (mobile,couponId) => { - var data = { - mobile:mobile, - couponId:couponId - } - return fetch('coupon?type=fetch', data, 'POST' ) +//优惠券的插入 +export const inserdiscount = (mobile, couponId) => { + var data = { + mobile: mobile, + couponId: couponId } + return fetch('coupon?type=fetch', data, 'POST') +} - //优惠券的查询 - export const getdiscount = (memberId,channelSecurity,mobile) => { - var data = { - memberId:memberId, - mobile:mobile - } - return fetch('memberAddress?type=getAll', data, 'POST' ) - } - - //可用的优惠券 - export const alldiscount = (memberId,channelSecurity,mobile) => { - var data = { - memberId:memberId, - } - return fetch('couponConfig?type=getAll', data, 'POST' ) - } - - - //用户领取的优惠券 - export const getdraw = (mobile,states) => { - var data = { - mobile:mobile, - status:states - } - return fetch('coupon?type=getAll', data, 'POST' ) - } - - - //微信支付 - export const generateOrderWX = (list) => { - var data = [{ - - - }] - return fetch('generateOrderWX', list, 'POST' ) +//优惠券的查询 +export const getdiscount = (memberId, channelSecurity, mobile) => { + var data = { + memberId: memberId, + mobile: mobile } - //用户所有的优惠券 - export const allConfig = (memberId,channelSecurity,mobile) => { - var data = { - } - return fetch('couponConfig?type=getAll', data, 'POST' ) - } - + return fetch('memberAddress?type=getAll', data, 'POST') +} - //用户领取优惠券 - export const getConfig = (memberId,couponId) => { - var data = { - memberId:memberId, - couponId:couponId, - } - return fetch('coupon?type=fetch', data, 'POST' ) - } - - - //用户下的优惠券 - export const userConfig = (memberId,couponId) => { - var data = { - memberId:memberId, - couponId:couponId, - } - return fetch('coupon?type=fetch', data, 'POST' ) - } - - - - - //用户订单的查询 - // export const customerorders = (memberId,channelSecurity,mobile) => { - // var data = { - // productName:'幼猫全价粮', - // buyCount:'2', - // productId:'210352', - // payAmount:'517', - // memberId:'844350', - // phoneNumber:'18112621098', - // } - // return fetch('generateOrderWX', data, 'POST' ) - // } - - - //地址的查询 - export const selectaddress = (memberId, pet,address) => { - var data = { - memberId:memberId, - } - return fetch('memberAddress?type=getAll', data, 'POST' ) +//可用的优惠券 +export const alldiscount = (memberId, channelSecurity, mobile) => { + var data = { + memberId: memberId, } + return fetch('couponConfig?type=getAll', data, 'POST') +} - //地址的添加 //id/详细地址/ 收货人姓名/收货人电话号码/省份id/城市id/区域编码 - export const editaddress = (memberId, detailAddress,recipient,tel,provinceId,cityId,districtId) => { - var data = { - memberId:844350, - provinceId:25, - cityId:36, - districtId:418, - detailAddress:'古美路1455弄46号302', - recipient:'蒋缘缘2', - recipientPhone:'13671516167', - zipCode:'214423', - default:false, - } - return fetch('memberAddress?type=add', data, 'POST' ) +//用户领取的优惠券 +export const getdraw = (mobile, states) => { + var data = { + mobile: mobile, + status: states } + return fetch('coupon?type=getAll', data, 'POST') +} - //删除 - export const editdelete = (memberId,ids) => { - var data = { - memberId:memberId, - ids:ids, - } - return fetch('memberAddress?type=delete', data, 'POST' ) - } - //地址的编辑 - export const editupdate = (mobile, pet,address) => { - var data = { - - memberId:'3242', - id:'620111', - provinceId:'', - cityId:'', - districtId:'', - detailAddress:'江西省萍乡市', - recipient:'刘佳敏', - recipientPhone:'13407998521', - zipCode:'', - isDefault:'', - } - return fetch('memberAddress?type=update', data, 'POST' ) - } +//微信支付 +export const generateOrderWX = (list) => { + return fetch('generateOrderWX', list, 'POST') +} +//微信支付返回 +export const updateOrderWX = (data) => { + return fetch('updateOrderWX', data, 'POST') +} +//支付宝支付 +export const generateOrderAlipay = (list) => { + return fetch('generateOrderAlipay', list, 'POST') +} + +//用户所有的优惠券 +export const allConfig = (memberId, channelSecurity, mobile) => { + var data = { + } + return fetch('couponConfig?type=getAll', data, 'POST') +} + + +//用户领取优惠券 +export const getConfig = (memberId, couponId) => { + var data = { + memberId: memberId, + couponId: couponId, + } + return fetch('coupon?type=fetch', data, 'POST') +} + + +//用户下的优惠券 +export const userConfig = (memberId, couponId) => { + var data = { + memberId: memberId, + couponId: couponId, + } + return fetch('coupon?type=fetch', data, 'POST') +} + + + + +//用户订单的查询 +// export const customerorders = (memberId,channelSecurity,mobile) => { +// var data = { +// productName:'幼猫全价粮', +// buyCount:'2', +// productId:'210352', +// payAmount:'517', +// memberId:'844350', +// phoneNumber:'18112621098', +// } +// return fetch('generateOrderWX', data, 'POST' ) +// } + +//地址的查询 +export const memberAddress = (type, data) => { + return fetch('memberAddress?type=' + type, data, 'POST') +} + + +//地址的查询 +export const selectaddress = (memberId, pet, address) => { + var data = { + memberId: memberId, + } + return fetch('memberAddress?type=getAll', data, 'POST') +} + + +//地址的添加 //id/详细地址/ 收货人姓名/收货人电话号码/省份id/城市id/区域编码 +export const editaddress = (memberId, detailAddress, recipient, tel, provinceId, cityId, districtId) => { + var data = { + memberId: 844350, + provinceId: 25, + cityId: 36, + districtId: 418, + detailAddress: '古美路1455弄46号302', + recipient: '蒋缘缘2', + recipientPhone: '13671516167', + zipCode: '214423', + default: false, + } + return fetch('memberAddress?type=add', data, 'POST') +} + +//删除 +export const editdelete = (memberId, ids) => { + var data = { + memberId: memberId, + ids: ids, + } + return fetch('memberAddress?type=delete', data, 'POST') +} + +//地址的编辑 +export const editupdate = (mobile, pet, address) => { + var data = { + + memberId: '3242', + id: '620111', + provinceId: '', + cityId: '', + districtId: '', + detailAddress: '江西省萍乡市', + recipient: '刘佳敏', + recipientPhone: '13407998521', + zipCode: '', + isDefault: '', + } + return fetch('memberAddress?type=update', data, 'POST') +} //修改密码 -export const userchange = (id, pet,address) => { +export const userchange = (id, pet, address) => { var data = { - id:id, + id: id, } - return fetch('member?type=update', data, 'POST' ) + return fetch('member?type=update', data, 'POST') } diff --git a/rc-busness/assets/pay/fail.png b/rc-busness/assets/pay/fail.png new file mode 100644 index 00000000..71821a9b Binary files /dev/null and b/rc-busness/assets/pay/fail.png differ diff --git a/rc-busness/assets/pay/wx.png b/rc-busness/assets/pay/wx.png new file mode 100644 index 00000000..7316a9d7 Binary files /dev/null and b/rc-busness/assets/pay/wx.png differ diff --git a/rc-busness/assets/pay/zfb.png b/rc-busness/assets/pay/zfb.png new file mode 100644 index 00000000..c68db2ab Binary files /dev/null and b/rc-busness/assets/pay/zfb.png differ diff --git a/rc-busness/assets/style/default.less b/rc-busness/assets/style/default.less new file mode 100644 index 00000000..530384c0 --- /dev/null +++ b/rc-busness/assets/style/default.less @@ -0,0 +1,78 @@ +* { + margin: 0; + padding: 0; +} + +html { + line-height: 160%; +} + +.rc_contline { + border-bottom: 3px solid #f6f6f6; + height: 0px; + margin: 0; + clear: both; +} + +.page_modules { + padding-top: 100px; +} + +.cont_modules { + margin: 0 auto; + max-width: 1400px; +} + +.inline_right { + display: flex; + justify-content: space-between; + width: 100%; +} + +.inline_mid { + display: flex; + justify-content: space-around; + width: 100%; +} + +.inline_left { + display: flex; + justify-content: space-evenly; + width: 100%; + +} + +.li_inline { + li { + display: inline-block; + vertical-align: middle; + } + +} + +.color_red { + color: #E2001A; +} + +.tc { + text-align: center; +} + +.tr { + text-align: right; +} +.el-dialog{ + width: 90%; + max-width: 440px; +} +#tns2-iw{ height: 90px;} +.rc-carousel:not(.rc-carousel--loaded){visibility:visible!important} +@media screen and (max-width: 768px) { + .el-message-box{ + width: 300px; + } + .el-dialog{ + width: 90%; + } + } + \ No newline at end of file diff --git a/rc-busness/nuxt.config.js b/rc-busness/nuxt.config.js index d6cbd94f..5d545b3e 100644 --- a/rc-busness/nuxt.config.js +++ b/rc-busness/nuxt.config.js @@ -1,7 +1,7 @@ const trackingScript = 'var dataLayer = window.dataLayer = window.dataLayer || [];dataLayer.push({"user":{"sitecoreId":"00000000-0000-0000-0000-000000000000","locale":"zh-HK"},"session":{"id":"vvfwez43vfoomct4y3yqneqy"},"site":{"country":"HK","id":"RCGlobalMC1","environment":"prd"},"page":{"type":"Start of Life Page","hitTimestamp":"2020-10-16T16:26:21.7350880+00:00","topic":"Collecting your kitten and their first week with you","theme":"Cat"},"pet":{"specieId":"2"}});'; const assetsUrl = 'var assetsUrl="/royalcanin-cdn-assets-new/css_js/";var isInitialized=false;'; export default { - + // Global page headers: https://go.nuxtjs.dev/config-head head: { title: '皇家官方商城', @@ -29,8 +29,8 @@ export default { ], link: [ { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }, - { rel: 'stylesheet', id:'royal-canin' ,href: '/royalcanin-cdn-assets-new/css_js/royal-canin.styles.prefix.min.critical.css?v=8-10-0'}, - //{ rel: 'stylesheet', id:'royal-canin' ,href: '/royalcanin-cdn-assets-new/css_js/royal-canin.styles.prefix.min.css?v=8-10-0'}, + { rel: 'stylesheet', id: 'royal-canin', href: '/royalcanin-cdn-assets-new/css_js/royal-canin.styles.prefix.min.critical.css?v=8-10-0' }, + //{ rel: 'stylesheet', id:'royal-canin' ,href: '/royalcanin-cdn-assets-new/css_js/royal-canin.styles.prefix.min.css?v=8-10-0'}, ] }, @@ -38,10 +38,12 @@ export default { css: [ 'vant/lib/index.css', 'element-ui/lib/theme-chalk/index.css', + '@/assets/style/default.less', { src:'@/assets/css/global.less'}, { src:'@/assets/css/royalcanin-custom.css'}, + { src: "swiper/css/swiper.css" } - + ], router: { middleware: ['metaTitle'] @@ -54,8 +56,8 @@ export default { '@/plugins/ElementUI', { src: '@/plugins/localStorage', ssr: false }, - - + + ], // Auto import components: https://go.nuxtjs.dev/config-components @@ -68,12 +70,12 @@ export default { // Modules: https://go.nuxtjs.dev/config-modules modules: [ '@nuxtjs/axios', - ['nuxt-tailvue', {toast: true}], - + ['nuxt-tailvue', { toast: true }], + ], - + styleResources: { - less: '@/assets/style/less/default.less' // less文件路径 + less: '/assets/style/default.less' // less文件路径 }, // Build Configuration: https://go.nuxtjs.dev/config-build build: { @@ -93,7 +95,7 @@ export default { // '^/api/': '/', // changeOrigin: true // }, - + // } // }, diff --git a/rc-busness/pages/address/address.vue b/rc-busness/pages/address/address.vue new file mode 100644 index 00000000..58b6837e --- /dev/null +++ b/rc-busness/pages/address/address.vue @@ -0,0 +1,127 @@ + + + + \ No newline at end of file diff --git a/rc-busness/pages/myorder/userrecord.vue b/rc-busness/pages/myorder/userrecord.vue index 3b1991bb..7c284dfa 100644 --- a/rc-busness/pages/myorder/userrecord.vue +++ b/rc-busness/pages/myorder/userrecord.vue @@ -1,108 +1,101 @@ \ No newline at end of file diff --git a/rc-busness/pages/personal/settlement.less b/rc-busness/pages/personal/settlement.less new file mode 100644 index 00000000..72c8358a --- /dev/null +++ b/rc-busness/pages/personal/settlement.less @@ -0,0 +1,414 @@ +ul li ol li em strong i { + list-style: none; + font-style: normal; +} + +.rc-header { + width: 100%; +} + + + +.settlement { + padding-top: 100px; +} + + +.rc-main { + width: 92%; + margin: 0 auto; + max-width: 1400px; + + .rc-userbottomm { + display: none; + } + + .rc-border { + width: 100%; + border-bottom: 1px solid #d7d7d7; + margin-top: 32px; + } + + .rc-receiving { + width: 100%; + height: 80px; + display: flex; + flex-direction: column; + + em { + font-style: normal; + color: #e1001a; + font-size: 26px; + } + + span { + color: #666666; + font-size: 16px; + display: block; + margin-top: 25px; + } + } + + .delivery { + display: flex; + flex-direction: column; + height: 140px; + display: flex; + justify-content: center; + + .viewdetails { + display: flex; + align-items: center; + justify-content: flex-end; + + span { + color: #444444; + font-size: 18px; + display: block; + margin-right: 8px; + } + + img { + width: 8px; + height: 16px; + } + } + + .to-delivery { + display: flex; + align-items: center; + font-style: normal; + + span { + display: block; + // margin-left: 16px; + font-size: 18px; + color: #333333; + } + + i { + font-style: normal; + margin-left: 8px; + display: block; + font-size: 18px; + color: #999999; + } + } + + .bo-delivery { + span { + font-size: 16px; + color: #666666; + display: block; + margin-top: 16px; + } + } + } + + .address-list { + display: flex; + + .mypersonal { + display: flex; + flex-direction: column; + justify-content: center; + border: 1px solid #808285; + height: 118px; + width: 320px; + padding: 15px; + color: #333333; + margin: 20px 40px 20px 0; + position: relative; + cursor: pointer; + + &.active { + border: 1px solid #E2001A; + } + + .edit { + position: absolute; + top: 5px; + right: 8px; + display: none; + cursor: pointer; + } + + &:hover { + .edit { + display: block; + } + } + + .my-delivery { + display: flex; + align-items: center; + font-style: normal; + + span { + display: block; + margin-left: 3px; + + } + + i { + font-style: normal; + margin-left: 3px; + display: block; + } + } + + .per-delivery { + span { + color: #666666; + display: block; + margin-top: 5px; + } + } + } + } + + + .rc-usermain { + display: flex; + padding: 20px 0; + + .rc-image { + border: 1px solid #d8d8d8; + margin-right: 20px; + + img { + width: 96px; + height: 96px; + display: block; + } + } + + .rc-right { + .rc-usercenter { + display: flex; + justify-content: center; + flex-direction: column; + + h3, + .price { + font-style: normal; + display: block; + font-size: 18px; + font-weight: bold; + margin-top: 17px; + color: #e1001a; + } + } + + display: flex; + justify-content: space-between; + width: 100%; + } + + .rc-userright { + display: flex; + flex-direction: column; + color: #666666; + font-size: 16px; + + span { + display: block; + margin-top: 16px; + font-size: 16px; + } + } + + .rc-userbottom { + display: flex; + width: 60%; + justify-content: space-between; + align-items: center; + + .price { + font-style: normal; + color: #e1001a; + font-size: 20px; + font-weight: bold; + } + + } + } + + .rc-merchandise { + + padding: 15px 0; + + &::after { + display: block; + content: ''; + clear: both; + } + + ul { + width: 25%; + display: flex; + flex-direction: column; + justify-content: space-between; + line-height: 40px; + float: right; + + i { + font-style: normal; + color: #666666; + } + + li { + list-style: none; + font-style: normal; + display: flex; + justify-content: space-between; + + span { + color: #333333; + } + } + + li .red { + color: #e1001a; + font-size: 20px; + font-style: normal; + } + } + } + + .rc-payment { + width: 100%; + margin-top: 80px; + + .u-trackingnumber { + display: flex; + align-items: center; + + i { + font-size: 18px; + font-style: normal; + margin-right: 16px; + } + + img { + width: 8px; + height: 16px; + } + } + + ul { + width: 100%; + display: flex; + flex-direction: column; + justify-content: space-between; + line-height: 40px; + font-size: 18px; + + i { + font-style: normal; + color: #666666; + display: block; + } + + li { + list-style: none; + font-style: normal; + display: flex; + justify-content: space-between; + + span { + color: #333333; + } + } + } + } + + .rc-foot { + display: flex; + flex-direction: column; + + .rc-foo { + display: flex; + justify-content: flex-end; + flex-direction: column; + align-items: self-end; + + i { + font-style: normal; + color: #333333; + font-size: 20px; + margin-right: 20px; + } + + em { + font-style: normal; + color: #e1001a; + font-size: 26px; + } + + span { + display: block; + width: 164px; + margin-top: 36px; + background: #e2001a; + line-height: 48px; + text-align: center; + color: white; + font-size: 16px; + + height: 48px; + + border-radius: 30px; + } + } + } +} +.diallog_width{ + width: 100%; + max-width: 440px; +} +.el-dialog{ + width: 100%; +} +//手机端 +@media screen and (max-width: 768px) { + + .diallog_width{ + width: 100%; + + } + .rc-main { + .address-list { + display: contents; + + .mypersonal { + width: 100%; + height: auto; + } + } + .rc-usermain { + .rc-right { display: table} + } + .rc-merchandise{ + padding: 15px 0 120px; + ul{ + float: none; + width: 100%; + } + } + .rc-foot{ + .rc-foo{ + display: flex; + justify-content: space-around; + flex-direction: row; + align-items: self-end; + position: fixed; + bottom: 0; + background: #fff; + width: 100%; + padding: 10px; + } + } + } + +} \ No newline at end of file diff --git a/rc-busness/pages/personal/settlement.vue b/rc-busness/pages/personal/settlement.vue index 878947ec..f600c887 100644 --- a/rc-busness/pages/personal/settlement.vue +++ b/rc-busness/pages/personal/settlement.vue @@ -1,5 +1,5 @@ @@ -112,23 +113,18 @@ export default { meta: {title: '订单结算'}, data() { return { - goldmedal:[], + goldmedal: [], addressstype: null, - orderstatus: '', - userisdelivery:'待收货', + orderstatus: "", + userisdelivery: "待收货", userdelivery: "派送中", - isshow:true, + isshow: true, leftico: require("../../assets/image/rc-left.png"), - orderNumber:'', - - // delivery: [ - // { - // state: "派送中", - // time: "2021-11-21", - // address: "广州天河—刘某某【15124617917】正在派送中", - // }, - // ], - + orderNumber: "", + dialogAdd: false, + editAddressData: {}, + curAddress: {}, + saveType: "", useraddress: [ { state: "李某某", @@ -170,40 +166,166 @@ export default { promotion: "¥167.00", payment: "¥0.00 ", }, - information: { - reference: "1111111111111111", - ordertime: "2012-12-01 11:20:00", - paymentmethod: "微信支付", - distribution: "快递", - trackingnumber: "11111111111111", - catimage: require("../../assets/image/rc-left.png"), - }, }; }, + computed: { + // 总价计算 + sumPrice() { + return this.goldmedal + .reduce((pre, cur) => { + console.log(pre); + return pre + cur.buyCount * cur.productPrice; + }, 0); + }, + }, methods: { -jiesuan(){ - // let userdata=this.$route.query.wxdata + async getAddressList() { + let memberId = JSON.parse(localStorage.getItem("userInfo")).data.id; + let { data } = await memberAddress("getAll", { memberId: memberId }); + data.forEach((item) => { + item.address = + item.provinceName + + item.cityName + + item.districtName + + item.detailAddress; + }); + this.useraddress = data; + console.log(data); + }, + editAddress(item) { + this.editAddressData = { + memberId: item.memberId, + name: item.recipient, + tel: item.recipientPhone, + detailAddress: item.detailAddress, + id: item.id, + city: item.cityName, + districtId: item.districtName, + saveType: "edit", + }; + this.dialogAdd = true; + }, + addAddress() { + this.editAddressData = {}; + this.dialogAdd = true; + }, + selectAddress(cur) { + this.useraddress.forEach((item) => { + if (item.id == cur.id) { + item.isDefault = true; + } else { + item.isDefault = false; + } + }); + + }, + dialogCtrl(parm) { + this.dialogAdd = parm; + this.getAddressList(); + }, + async jiesuan() { + let orderAddress = this.useraddress.filter(item=>item.isDefault) + let postData =[] + this.goldmedal.forEach(item=>{ + let oneProduct={ + productName: item.productName, + buyCount: item.buyCount, + productId:item. productCode, + payAmount: item.productPrice, + memberId: item.memberId, + phoneNumber: item.mobile, + // couponId: "NGQ2022P12", + // couponTypeId: "4", + // couponName: "内购券", + // couponAmount: "0.3175", + // couponCode: "0007792402", + orderAddress: { + addressPhoneNumber:orderAddress[0].recipientPhone, + addressUserName:orderAddress[0].recipient, + addressProvinceName: orderAddress[0].provinceName, + addressCityName:orderAddress[0].cityName, + addressCountyName: orderAddress[0].districtName, + addressDetailInfo: orderAddress[0].detailAddress, + }, + } + postData.push(oneProduct) + }) + // let postData = [ + // { + // productName: this.goldmedal.productName, + // buyCount: "2", + // productId: "20030200", + // payAmount: "147.00", + // memberId: "844350", + // phoneNumber: "18112621098", + // couponId: "NGQ2022P12", + // couponTypeId: "4", + // couponName: "内购券", + // couponAmount: "0.3175", + // couponCode: "0007792402", + // orderAddress: { + // addressPhoneNumber:orderAddress[0].recipientPhone, + // addressUserName:orderAddress[0].recipient, + // addressProvinceName: orderAddress[0].provinceName, + // addressCityName:orderAddress[0].cityName, + // addressCountyName: orderAddress[0].districtName, + // addressDetailInfo: orderAddress[0].detailAddress, + // }, + // }, + // // { + // // productName: "幼猫全价粮", + // // buyCount: "2", + // // productId: "20030200", + // // payAmount: "147.00", + // // memberId: "844350", + // // phoneNumber: "18112621098", + // // couponId: "NGQ2022P12", + // // couponTypeId: "4", + // // couponName: "内购券", + // // couponAmount: "0.3175", + // // couponCode: "0007792402", + // // orderAddress: { + // // addressPhoneNumber: "13602898745", + // // addressUserName: "张三", + // // addressProvinceName: "江苏省", + // // addressCityName: "无锡市", + // // addressCountyName: "江阴市", + // // addressDetailInfo: "东苑一村", + // // }, + // // }, + // ]; + // let res = await generateOrderWX(postData); + // if (res.success) { + // let payData=res.data + let userPayData={ + postData:postData, + wxPay:'weixin://wxpay/bizpayurl?pr=4RJbokxzz' + + } this.$router.push({ - path: "/personal/userpay", - query: { - wxdata:userdata - }, - - }); -}, - async canceldanhao(orderNumber){ - let data=await userin(orderNumber); - console.log(data); -// this.goldmedal=data; - console.log(this.goldmedal); -}, + path: "/personal/userpay", + query: { + userPayData: userPayData, + }, + }); + // } + }, + async canceldanhao(orderNumber) { + let data = await userin(orderNumber); + console.log(data); + // this.goldmedal=data; + console.log(this.goldmedal); + }, }, mounted() { - this.addressstype = this.$route.query.stype; - this.orderNumber=this.$route.query.orderNumber; - this.canceldanhao(this.orderNumber) - console.log(this.$refs.rccolor) - this.$refs.rccolor.style.background='gray'; + this.goldmedal = this.$route.query.list; + console.log(this.$route.query.list); + this.getAddressList(); + // this.addressstype = this.$route.query.stype; + // this.orderNumber = this.$route.query.orderNumber; + // this.canceldanhao(this.orderNumber); + // console.log(this.$refs.rccolor); + // this.$refs.rccolor.style.background = "gray"; }, components: { Myheader, diff --git a/rc-busness/pages/personal/userpay.vue b/rc-busness/pages/personal/userpay.vue index a3070243..2e3c85fb 100644 --- a/rc-busness/pages/personal/userpay.vue +++ b/rc-busness/pages/personal/userpay.vue @@ -1,578 +1,320 @@ \ No newline at end of file diff --git a/rc-busness/pages/productdetails/producted.vue b/rc-busness/pages/productdetails/producted.vue index dc8b3529..96b4f4c9 100644 --- a/rc-busness/pages/productdetails/producted.vue +++ b/rc-busness/pages/productdetails/producted.vue @@ -73,159 +73,222 @@
-
-
-
-
- 商品规格:
- + + + +
+
+
+ + +
+
+
+
+
+

{{ item.productName }}

+
+
+
+
+
+
+ 商品价格: + ¥{{ item.rsp }} + ¥{{ item.ecPrice }} + +
+
+
+ 活动促销: + 全场商品限时优惠 +
+ 立即领取 +
+
+
+
+
+
+
+ +
+
+
+
+ 商品规格: +
+ - - {{ item.specifications }} - + + {{ item.specifications }} + +
+
+
+
+
商品数量:
+ + {{ sales_num }} + +
+
+
+
+
+
+
+
+ 加入购物车 + 立即购买 +
+
+
    +
  • + 服务说明:当天14点前完成付款即日安排发货;当天14点后完成付款次日安排发货(周日及国家法定节假日顺延至下一个工作日发货,活动期间发货或有延迟敬请理解) +
  • +
  • + 商品运费:全场包邮(港澳除外) +
  • + +
  • + 商品编号:{{ item.brandCode }} +
  • +
+
+
+
+
-
-
-
-
商品数量:
- - {{sales_num}} - -
-
-
-
-
-
-
-
- -
-
- 加入购物车 - 立即购买 -
-
-
- - - - -
- - -
-
- -
- - 回到顶部 -
-
- - - -
-
+
+ +
+
+
    +
  • - -
    -
    -
    - {{ item.couponAmount }} -
    + + {{ userfixed.title }} +
  • +
+
+ + 回到顶部 +
+
+ +
+ +
+
+ +
+
+
+

+
+
+ + {{ item.special }} + +
+ 有效期 + {{ item.starttime }}
-
- - {{ item.couponDesc }} - -
- 有效期 - {{ item.validTo }} -
- + - -
- -
- - - -
-
- -
-
-

温馨提示

- 请先点击下方进行登录/注册 - -
- -
- 立即登录 - -
-
+
+
+ + +
+
+ +
+
+

温馨提示

+ 请先点击下方进行登录/注册 +
+ +
+ 立即登录 +
+
+
+
+
+ 加入购物车 + 立即购买
- - - -
- 加入购物车 - 立即购买 -