diff --git a/rc-busness/README.md b/rc-busness/README.md new file mode 100644 index 00000000..e05b7c8b --- /dev/null +++ b/rc-busness/README.md @@ -0,0 +1,69 @@ +# rc-busness + +## Build Setup + +```bash +# install dependencies +$ npm install + +# serve with hot reload at localhost:3000 +$ npm run dev + +# build for production and launch server +$ npm run build +$ npm run start + +# generate static project +$ npm run generate +``` + +For detailed explanation on how things work, check out the [documentation](https://nuxtjs.org). + +## Special Directories + +You can create the following extra directories, some of which have special behaviors. Only `pages` is required; you can delete them if you don't want to use their functionality. + +### `assets` + +The assets directory contains your uncompiled assets such as Stylus or Sass files, images, or fonts. + +More information about the usage of this directory in [the documentation](https://nuxtjs.org/docs/2.x/directory-structure/assets). + +### `components` + +The components directory contains your Vue.js components. Components make up the different parts of your page and can be reused and imported into your pages, layouts and even other components. + +More information about the usage of this directory in [the documentation](https://nuxtjs.org/docs/2.x/directory-structure/components). + +### `layouts` + +Layouts are a great help when you want to change the look and feel of your Nuxt app, whether you want to include a sidebar or have distinct layouts for mobile and desktop. + +More information about the usage of this directory in [the documentation](https://nuxtjs.org/docs/2.x/directory-structure/layouts). + + +### `pages` + +This directory contains your application views and routes. Nuxt will read all the `*.vue` files inside this directory and setup Vue Router automatically. + +More information about the usage of this directory in [the documentation](https://nuxtjs.org/docs/2.x/get-started/routing). + +### `plugins` + +The plugins directory contains JavaScript plugins that you want to run before instantiating the root Vue.js Application. This is the place to add Vue plugins and to inject functions or constants. Every time you need to use `Vue.use()`, you should create a file in `plugins/` and add its path to plugins in `nuxt.config.js`. + +More information about the usage of this directory in [the documentation](https://nuxtjs.org/docs/2.x/directory-structure/plugins). + +### `static` + +This directory contains your static files. Each file inside this directory is mapped to `/`. + +Example: `/static/robots.txt` is mapped as `/robots.txt`. + +More information about the usage of this directory in [the documentation](https://nuxtjs.org/docs/2.x/directory-structure/static). + +### `store` + +This directory contains your Vuex store files. Creating a file in this directory automatically activates Vuex. + +More information about the usage of this directory in [the documentation](https://nuxtjs.org/docs/2.x/directory-structure/store). diff --git a/rc-busness/ajax/getData.js b/rc-busness/ajax/getData.js index 87cbff55..56dd089d 100644 --- a/rc-busness/ajax/getData.js +++ b/rc-busness/ajax/getData.js @@ -131,11 +131,11 @@ export const mostAddClass = (id) => { /** * 筛选标签 */ - export const userstype = (mobile, pet,address) => { + export const userstype = (stype, pet,address) => { var data = { - + petType:0, } - return fetch('productSearchTag/query', data, 'POST' ) + return fetch('productSearchTag/query?petType=' + 0, data, 'POST' ) } /** * 登录 @@ -201,18 +201,62 @@ export const userque = (stype) => { //标品全部信息 -export const biaomessage = (stype) => { +export const biaomessage = (stype,name) => { console.log(stype); var data = { - petType:stype + petType:stype, + page:1, + row:10 } return fetch('product/query?petType='+stype, data, 'POST' ) } +export const searchchanpin = (stype,categoryName,tagUsedAge,tagFunction,tagBreed) => { + console.log(stype); + var data = { + petType:stype, + page:1, + row:10 + } + + // return fetch('product/query?petType='+stype+'&categoryName='+categoryName+'&tagUsedAge='+tagUsedAge+'&tagFunction='+tagFunction+'&tagBreed='+tagBreed, data, 'POST' ) +} + + +//查询订单 +export const userindent = (phoneNumber,orderNumber,) => { + var data = { + phoneNumber:'18112621098', + orderNumber:orderNumber, + } + return fetch('orderMaster/?type=query', data, 'POST' ) +} +//查询订单详情 +export const userin = (orderNumber,) => { + var data = { + orderNumber:orderNumber, + } + return fetch('orderMaster/?type=query', data, 'POST' ) +} + + + +//取消订单 +export const canceldanhao = (orderNumber) => { + var data = { + + orderNumber:orderNumber, + } + return fetch('cancelOrder/', data, 'POST' ) +} + + export const biaomessa = (stype) => { console.log(stype); var data = { - name:stype + name:stype, + page:1, + row:10 } return fetch('product/query', data, 'POST' ) } @@ -356,7 +400,6 @@ export const goodsmessage = (productCode) => { //用户领取的优惠券 export const getdraw = (mobile,states) => { var data = { - channelSecurity:'H5@2021', mobile:mobile, status:states } @@ -403,17 +446,17 @@ export const goodsmessage = (productCode) => { //用户订单的查询 - 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 customerorders = (memberId,channelSecurity,mobile) => { + // var data = { + // productName:'幼猫全价粮', + // buyCount:'2', + // productId:'210352', + // payAmount:'517', + // memberId:'844350', + // phoneNumber:'18112621098', + // } + // return fetch('generateOrderWX', data, 'POST' ) + // } //地址的查询 diff --git a/rc-busness/assets/cat/four.jpg b/rc-busness/assets/cat/four.jpg new file mode 100644 index 00000000..80b5e099 Binary files /dev/null and b/rc-busness/assets/cat/four.jpg differ diff --git a/rc-busness/assets/cat/one.jpg b/rc-busness/assets/cat/one.jpg new file mode 100644 index 00000000..a366dffa Binary files /dev/null and b/rc-busness/assets/cat/one.jpg differ diff --git a/rc-busness/assets/cat/three.jpg b/rc-busness/assets/cat/three.jpg new file mode 100644 index 00000000..b6cc9818 Binary files /dev/null and b/rc-busness/assets/cat/three.jpg differ diff --git a/rc-busness/assets/cat/two.jpg b/rc-busness/assets/cat/two.jpg new file mode 100644 index 00000000..306ff5b1 Binary files /dev/null and b/rc-busness/assets/cat/two.jpg differ diff --git a/rc-busness/assets/css/index.less b/rc-busness/assets/css/index.less index e4e61ffb..14bf3e55 100644 --- a/rc-busness/assets/css/index.less +++ b/rc-busness/assets/css/index.less @@ -1,4 +1,38 @@ -@media screen and (max-width:768px){ +@media screen and(min-width: 320px) and(max-width:768px){ + + + + .searchBara{ + position: fixed; + top: 0; + width: 100%; + position: fixed; + top:0; + background: white; + z-index: 9999; + overflow-x: auto; + white-space: nowrap; + span{ + margin-top: 0.08rem; + display: block; + } + img{ + width: 0.64rem; + height: 0.64rem; + display: block; + } + li{ + display: inline-block; + margin-left: 0.20rem; + width: 0.64rem; + text-align: center; +height: 0.64rem; +background: #F6F6F6; +border-radius: 50%; +opacity: 1; + } + } + .rc-login{ width: 92%; margin:0 auto; @@ -133,7 +167,12 @@ ul{ } img{ width: 0.19rem; - height: 0.20rem; + height: 0.19rem; + display: block; +} +img:last-child{ + width: 0.22rem; + height: 0.22rem; display: block; } span{ @@ -155,8 +194,8 @@ flex-direction: column; justify-content: center; margin-top: 8px; img{ - width: 0.19rem; - height: 0.32rem; + width: 0.22rem; + height: 0.22rem; display: block; } } @@ -223,8 +262,6 @@ flex-direction: column; flex-direction: column; justify-content: center; align-items: center; - height: 100%; - height: 100%; border: 1px solid #d7d7d7; .rc-click{ width: 100%; @@ -238,7 +275,7 @@ flex-direction: column; width: 1.77rem; height: 100px; display: block; - margin-top: 0.20rem; + margin-top: 0.40rem; } span{ font-size: 0.18rem; @@ -270,6 +307,7 @@ text-overflow: -o-ellipsis-lastline; justify-content: center; position: relative; z-index: 9999; + padding-bottom: 0.34rem; i{ font-style: normal; width: 1.30rem; @@ -356,6 +394,8 @@ opacity: 1; .selectionswitch{ .rc-conta{ max-height: 1.9rem; + min-height: 1.9rem; + } width: 100%; margin-top: 0.45rem; @@ -389,11 +429,10 @@ border-radius: 0.03rem; } img{ - width: 0.85rem; + width: 100%; display: flex; margin: 0 auto; - height: 1.14rem -; + height:100%; } i{ font-style: normal; @@ -417,6 +456,7 @@ display: block; word-break: break-all; white-space: normal; height: 0.25rem; + margin-top: 0.08rem; } strong{ @@ -469,8 +509,8 @@ color: #FFFFFF; } +@media screen and (min-width: 768px) and (max-width: 1920px){ -@media screen and (min-width: 768px) and (max-width: 1920px) { .sw-center{ display: none; } @@ -511,6 +551,12 @@ li{ margin-top: 0.08rem; } } +img{ +width: 0.30rem; +height: 0.30rem; +display: block; +} + img{ width: 0.30rem; height: 0.30rem; @@ -933,4 +979,4 @@ margin-bottom: 0.80rem; } } -} \ No newline at end of file +} diff --git a/rc-busness/assets/css/search.less b/rc-busness/assets/css/search.less index b643059a..41208b08 100644 --- a/rc-busness/assets/css/search.less +++ b/rc-busness/assets/css/search.less @@ -250,16 +250,20 @@ font-size: 12px; text-align: center; width: 80%; + overflow-x: auto; + white-space: nowrap; } li{ - width: 40%; - height: 26px; - background: #FFFFFF; - border: 1px solid #D7D7D7; - line-height: 26px; - float: left; - border-radius: 100px; - margin-left: 9px; + display: inline-block; + text-align: center; + display: flex; + align-items: center; +height: 26px; +background: #FFFFFF; +border: 1px solid #D7D7D7; +padding: 0 5px 0 5px; +border-radius: 100px; + } } @@ -274,28 +278,32 @@ } ol{ display: flex; - align-items: center; - flex-wrap: nowrap; - font-size: 12px; - text-align: center; - width: 80%; + align-items: center; + flex-wrap: nowrap; + font-size: 12px; + text-align: center; + width: 80%; + overflow-x: auto; + white-space: nowrap; } li{ - width: 40%; - height: 26px; - background: #FFFFFF; - border: 1px solid #D7D7D7; - line-height: 26px; - float: left; - border-radius: 100px; - margin-left: 9px; - + display: inline-block; + text-align: center; + display: flex; + align-items: center; + height: 26px; + background: #FFFFFF; + border: 1px solid #D7D7D7; + padding: 0 5px 0 5px; + border-radius: 100px; } } .rc-contair{ margin-top: 24px; .rc-rccontair{ - height:160px;display:flex;align-items: center + height:1.6rem;display:flex;align-items: center; + width: 100% + } ul{ text-align: center; @@ -315,10 +323,10 @@ } img{ - width: 85px; + width: 100%; display: flex; margin: 0 auto; - height: 114px + height: 100% ; } i{ @@ -342,6 +350,8 @@ -webkit-box-orient: vertical; word-break: break-all; white-space: normal; + margin-top: 0.15rem; + height: 0.25rem; } strong{ width: 130px; @@ -360,6 +370,7 @@ margin-top: 20px; } .rc-click{ max-height: 1.9rem; + min-height: 1.9rem; } } } diff --git a/rc-busness/assets/image/.DS_Store b/rc-busness/assets/image/.DS_Store new file mode 100644 index 00000000..aefcc37e Binary files /dev/null and b/rc-busness/assets/image/.DS_Store differ diff --git a/rc-busness/assets/image/turntop.png b/rc-busness/assets/image/turntop.png new file mode 100644 index 00000000..b75d7ba4 Binary files /dev/null and b/rc-busness/assets/image/turntop.png differ diff --git a/rc-busness/assets/image/userleft.jpg b/rc-busness/assets/image/userleft.jpg new file mode 100644 index 00000000..f2b1b5df Binary files /dev/null and b/rc-busness/assets/image/userleft.jpg differ diff --git a/rc-busness/assets/image/userright.png b/rc-busness/assets/image/userright.png new file mode 100644 index 00000000..1c8b3971 Binary files /dev/null and b/rc-busness/assets/image/userright.png differ diff --git a/rc-busness/assets/image/usersucess.png b/rc-busness/assets/image/usersucess.png new file mode 100644 index 00000000..cefbd6c3 Binary files /dev/null and b/rc-busness/assets/image/usersucess.png differ diff --git a/rc-busness/components/header.vue b/rc-busness/components/header.vue index 322a709d..36a54909 100644 --- a/rc-busness/components/header.vue +++ b/rc-busness/components/header.vue @@ -68,7 +68,7 @@ export default { align-items: center; height: 70px; background-color: white; - z-index: 994; + z-index: 9999 ; .rc-center{ display: none; } diff --git a/rc-busness/components/magnifier.vue b/rc-busness/components/magnifier.vue index 086bc708..d4c13783 100644 --- a/rc-busness/components/magnifier.vue +++ b/rc-busness/components/magnifier.vue @@ -14,7 +14,7 @@
@@ -92,17 +92,23 @@ export default { } }, created() { - - if (this.imgList && this.imgList.length) { - this.pictureList = this.imgList + let user= JSON.parse(localStorage.getItem("message")); + console.log(user); + if(user!==null){ + this.pictureList=user; } - this.middleImg = this.pictureList[0].url + if (user && user.length) { + this.pictureList = user + } + this.middleImg = this.pictureList[0].attachmentPath; + console.log(this.middleImg); // 计算缩略图的宽度,默认是显示4张图片,两边箭头的宽度和为50 // this.itemWidth = (this.middleImgWidth-30) / 2 }, mounted() { - console.log(this.parentmsg) + + this.ifadroind(); this.$nextTick(() => { @@ -236,7 +242,7 @@ this.ifadroind(); }, // 切换图片 tabPicture (item,index) { - this.middleImg = item.url + this.middleImg = item.attachmentPath this.$emit('changeName',item) console.log(item,index) }, diff --git a/rc-busness/components/rc-footer.vue b/rc-busness/components/rc-footer.vue index 18d7fa60..035d90a1 100644 --- a/rc-busness/components/rc-footer.vue +++ b/rc-busness/components/rc-footer.vue @@ -24,7 +24,7 @@ +
- 查看更多 + 查看更多
+
@@ -260,7 +258,7 @@ - +
查看更多
@@ -278,8 +276,8 @@

全价犬湿粮

- - + +
  • @@ -290,14 +288,16 @@ {{item.name}} {{item.price}}
- 立即购买 + 立即购买 -
+ +
查看更多
+
@@ -346,7 +346,7 @@ - +
查看更多
@@ -363,8 +363,8 @@

全价犬干粮

- - + +
  • @@ -375,13 +375,15 @@ {{item.name}} {{item.price}}
- 立即购买 + 立即购买 -
+ +
查看更多
+
@@ -426,7 +428,7 @@
{{item.title}} {{item.price}} - 立即购买 + 立即购买 @@ -460,14 +462,16 @@ {{item.productName}}
- 立即购买 + 立即购买 -
+ +
查看更多
+
@@ -512,11 +516,11 @@
{{item.title}} {{item.price}} - 立即购买 + 立即购买 - +
查看更多
@@ -571,7 +575,7 @@
--> -
+
  • @@ -579,7 +583,7 @@
-
+
回到顶部
@@ -589,6 +593,7 @@
diff --git a/rc-busness/pages/myorder/userrecord.vue b/rc-busness/pages/myorder/userrecord.vue index 1398a5ca..93858ee7 100644 --- a/rc-busness/pages/myorder/userrecord.vue +++ b/rc-busness/pages/myorder/userrecord.vue @@ -211,7 +211,7 @@ export default { }); console.log(data); this.$router.push({ - path: "/personal/userpay", + path: "/personal/settlement", query: { wxdata:data.data }, @@ -228,6 +228,7 @@ export default { console.log(user); this.userid=user.data.id; let data = await deleteCart(user.data.id,productCode); + if(data){ this.$message({ type: 'warning', @@ -421,6 +422,9 @@ plus(num,index){ \ No newline at end of file diff --git a/rc-busness/pages/personal/useraddress.vue b/rc-busness/pages/personal/useraddress.vue index 80cebcea..b845bd84 100644 --- a/rc-busness/pages/personal/useraddress.vue +++ b/rc-busness/pages/personal/useraddress.vue @@ -21,16 +21,17 @@
+
- 订单编号:{{ item.ordernumber }} + 订单编号:{{ item.orderNumber }}
- 订单状态: {{ item.orderstype }} + 订单状态: {{item.status=='0'?'待付款':item.status=='1'?'待收货':item.status=='2'?'已完成':item.status=='3'?'已取消':'异常订单'}}
-
+
@@ -39,12 +40,12 @@
{{ item.usereat }}
- 规格:{{ item.num }} + 规格:{{ userlist.num }}
- 数量:{{ item.orderstype }}件 - ¥{{ item.userprice }} + 数量:{{ userlist.pcs}}件 + ¥{{ userlist.ecPrice }}
@@ -60,10 +61,11 @@ 查看订单
-
- {{item.buttontitle}} - 查看订单 -
+ +
@@ -71,12 +73,14 @@ @@ -265,7 +319,10 @@ export default { .rc-main { width: 92%; margin: 0 auto; - + .rc-usermaina{ + width: 100%; + height: 100%; + } .rc-headera { display: flex; justify-content: space-between; diff --git a/rc-busness/pages/personal/usermember.vue b/rc-busness/pages/personal/usermember.vue index e7c3b15d..c265e006 100644 --- a/rc-busness/pages/personal/usermember.vue +++ b/rc-busness/pages/personal/usermember.vue @@ -64,7 +64,39 @@ data(){ rcvalue:5000, uservalue:0, usrnewlist:[], - newlist:[], + newlist:[ + { + title: "产品试吃", + usereat:'每年4次免积分产品试吃', + ordernum: 0, + catimage: require("../../assets/image/usereat.png"), + }, + { + title: "成长工具", + usereat:'365天专属养宠工具', + ordernum: 1, + catimage: require("../../assets/image/rc-growth.png"), + }, + { + title: "1V1咨询", + usereat:'10年专业团队1v1咨询', + ordernum: 2, + catimage: require("../../assets/image/consult.png"), + }, + { + title: "知识课堂", + usereat:'行业大咖专业养宠知识', + ordernum: 3, + catimage: require("../../assets/image/rc-book.png"), + }, + { + title: "健康服务", + usereat:'每年积分兑换1次价值288元的免费体检及100元医院绝育券', + ordernum: 4, + catimage: require("../../assets/image/rc-health.png"), + }, + + ], newlista:[ { title: "产品试吃", @@ -216,11 +248,10 @@ methods:{ components:{ Myheader }, -mounted(){ +mounted(){ console.log(this.$refs.userblock); let userwidth=0; let user= JSON.parse(localStorage.getItem("userInfo")); - if(user!==null){ this.userid=user.data; let userlength=this.userid.availiblePoint.toString().length; diff --git a/rc-busness/pages/personal/userpay.vue b/rc-busness/pages/personal/userpay.vue index b3d97f48..a3070243 100644 --- a/rc-busness/pages/personal/userpay.vue +++ b/rc-busness/pages/personal/userpay.vue @@ -2,6 +2,7 @@
+
@@ -18,6 +19,7 @@ {{ userinformation }}
+
@@ -28,6 +30,7 @@ 请选择支付方式
+
- 商品价格: + 商品价格 ¥{{ item.rsp }} + ¥{{item.ecPrice}}
活动促销: - {{ item.basePrice }} + 全场商品限时优惠
立即领取
@@ -28,10 +29,14 @@ 立即购买
+
+
- 商品规格 +
+ 商品规格: +
@@ -41,7 +46,9 @@
- 商品数量: +
+ 商品数量: +
{{sales_num}}
- -
- 加入购物车 - 立即购买 -
+ +
@@ -88,6 +92,7 @@
+
+
+ 加入购物车 + 立即购买 +