Commit c5310e0de58115ea9ceb13cd9aee406e41ad0cfa
Merge branch 'myGiftBox'
# Conflicts: # src/main.js # src/router/index.js
Showing
46 changed files
with
3623 additions
and
42 deletions
.gitignore
package-lock.json
| ... | ... | @@ -314,7 +314,8 @@ |
| 314 | 314 | "version": "1.0.0", |
| 315 | 315 | "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", |
| 316 | 316 | "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", |
| 317 | - "dev": true | |
| 317 | + "dev": true, | |
| 318 | + "optional": true | |
| 318 | 319 | }, |
| 319 | 320 | "assign-symbols": { |
| 320 | 321 | "version": "1.0.0", |
| ... | ... | @@ -1943,6 +1944,16 @@ |
| 1943 | 1944 | "integrity": "sha512-1QL4544moEsDVH9T/l6Cemov/37iv1RtoKf7NJ04A60+4MREXNfx/QvavbH6QoGdsD4N4Mwy49cmaINR/o2mdg==", |
| 1944 | 1945 | "dev": true |
| 1945 | 1946 | }, |
| 1947 | + "clipboard": { | |
| 1948 | + "version": "2.0.6", | |
| 1949 | + "resolved": "https://registry.npmjs.org/clipboard/-/clipboard-2.0.6.tgz", | |
| 1950 | + "integrity": "sha512-g5zbiixBRk/wyKakSwCKd7vQXDjFnAMGHoEyBogG/bw9kTD9GvdAvaoRR1ALcEzt3pVKxZR0pViekPMIS0QyGg==", | |
| 1951 | + "requires": { | |
| 1952 | + "good-listener": "^1.2.2", | |
| 1953 | + "select": "^1.1.2", | |
| 1954 | + "tiny-emitter": "^2.0.0" | |
| 1955 | + } | |
| 1956 | + }, | |
| 1946 | 1957 | "cliui": { |
| 1947 | 1958 | "version": "2.1.0", |
| 1948 | 1959 | "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", |
| ... | ... | @@ -2056,6 +2067,7 @@ |
| 2056 | 2067 | "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", |
| 2057 | 2068 | "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", |
| 2058 | 2069 | "dev": true, |
| 2070 | + "optional": true, | |
| 2059 | 2071 | "requires": { |
| 2060 | 2072 | "delayed-stream": "~1.0.0" |
| 2061 | 2073 | } |
| ... | ... | @@ -3585,7 +3597,13 @@ |
| 3585 | 3597 | "version": "1.0.0", |
| 3586 | 3598 | "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", |
| 3587 | 3599 | "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", |
| 3588 | - "dev": true | |
| 3600 | + "dev": true, | |
| 3601 | + "optional": true | |
| 3602 | + }, | |
| 3603 | + "delegate": { | |
| 3604 | + "version": "3.2.0", | |
| 3605 | + "resolved": "https://registry.npmjs.org/delegate/-/delegate-3.2.0.tgz", | |
| 3606 | + "integrity": "sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw==" | |
| 3589 | 3607 | }, |
| 3590 | 3608 | "depd": { |
| 3591 | 3609 | "version": "1.1.2", |
| ... | ... | @@ -4326,7 +4344,8 @@ |
| 4326 | 4344 | "version": "1.3.0", |
| 4327 | 4345 | "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", |
| 4328 | 4346 | "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", |
| 4329 | - "dev": true | |
| 4347 | + "dev": true, | |
| 4348 | + "optional": true | |
| 4330 | 4349 | }, |
| 4331 | 4350 | "fast-deep-equal": { |
| 4332 | 4351 | "version": "1.1.0", |
| ... | ... | @@ -4655,7 +4674,8 @@ |
| 4655 | 4674 | "ansi-regex": { |
| 4656 | 4675 | "version": "2.1.1", |
| 4657 | 4676 | "bundled": true, |
| 4658 | - "dev": true | |
| 4677 | + "dev": true, | |
| 4678 | + "optional": true | |
| 4659 | 4679 | }, |
| 4660 | 4680 | "aproba": { |
| 4661 | 4681 | "version": "1.2.0", |
| ... | ... | @@ -4676,12 +4696,14 @@ |
| 4676 | 4696 | "balanced-match": { |
| 4677 | 4697 | "version": "1.0.0", |
| 4678 | 4698 | "bundled": true, |
| 4679 | - "dev": true | |
| 4699 | + "dev": true, | |
| 4700 | + "optional": true | |
| 4680 | 4701 | }, |
| 4681 | 4702 | "brace-expansion": { |
| 4682 | 4703 | "version": "1.1.11", |
| 4683 | 4704 | "bundled": true, |
| 4684 | 4705 | "dev": true, |
| 4706 | + "optional": true, | |
| 4685 | 4707 | "requires": { |
| 4686 | 4708 | "balanced-match": "^1.0.0", |
| 4687 | 4709 | "concat-map": "0.0.1" |
| ... | ... | @@ -4696,17 +4718,20 @@ |
| 4696 | 4718 | "code-point-at": { |
| 4697 | 4719 | "version": "1.1.0", |
| 4698 | 4720 | "bundled": true, |
| 4699 | - "dev": true | |
| 4721 | + "dev": true, | |
| 4722 | + "optional": true | |
| 4700 | 4723 | }, |
| 4701 | 4724 | "concat-map": { |
| 4702 | 4725 | "version": "0.0.1", |
| 4703 | 4726 | "bundled": true, |
| 4704 | - "dev": true | |
| 4727 | + "dev": true, | |
| 4728 | + "optional": true | |
| 4705 | 4729 | }, |
| 4706 | 4730 | "console-control-strings": { |
| 4707 | 4731 | "version": "1.1.0", |
| 4708 | 4732 | "bundled": true, |
| 4709 | - "dev": true | |
| 4733 | + "dev": true, | |
| 4734 | + "optional": true | |
| 4710 | 4735 | }, |
| 4711 | 4736 | "core-util-is": { |
| 4712 | 4737 | "version": "1.0.2", |
| ... | ... | @@ -4823,7 +4848,8 @@ |
| 4823 | 4848 | "inherits": { |
| 4824 | 4849 | "version": "2.0.3", |
| 4825 | 4850 | "bundled": true, |
| 4826 | - "dev": true | |
| 4851 | + "dev": true, | |
| 4852 | + "optional": true | |
| 4827 | 4853 | }, |
| 4828 | 4854 | "ini": { |
| 4829 | 4855 | "version": "1.3.5", |
| ... | ... | @@ -4835,6 +4861,7 @@ |
| 4835 | 4861 | "version": "1.0.0", |
| 4836 | 4862 | "bundled": true, |
| 4837 | 4863 | "dev": true, |
| 4864 | + "optional": true, | |
| 4838 | 4865 | "requires": { |
| 4839 | 4866 | "number-is-nan": "^1.0.0" |
| 4840 | 4867 | } |
| ... | ... | @@ -4849,6 +4876,7 @@ |
| 4849 | 4876 | "version": "3.0.4", |
| 4850 | 4877 | "bundled": true, |
| 4851 | 4878 | "dev": true, |
| 4879 | + "optional": true, | |
| 4852 | 4880 | "requires": { |
| 4853 | 4881 | "brace-expansion": "^1.1.7" |
| 4854 | 4882 | } |
| ... | ... | @@ -4856,12 +4884,14 @@ |
| 4856 | 4884 | "minimist": { |
| 4857 | 4885 | "version": "0.0.8", |
| 4858 | 4886 | "bundled": true, |
| 4859 | - "dev": true | |
| 4887 | + "dev": true, | |
| 4888 | + "optional": true | |
| 4860 | 4889 | }, |
| 4861 | 4890 | "minipass": { |
| 4862 | 4891 | "version": "2.2.4", |
| 4863 | 4892 | "bundled": true, |
| 4864 | 4893 | "dev": true, |
| 4894 | + "optional": true, | |
| 4865 | 4895 | "requires": { |
| 4866 | 4896 | "safe-buffer": "^5.1.1", |
| 4867 | 4897 | "yallist": "^3.0.0" |
| ... | ... | @@ -4880,6 +4910,7 @@ |
| 4880 | 4910 | "version": "0.5.1", |
| 4881 | 4911 | "bundled": true, |
| 4882 | 4912 | "dev": true, |
| 4913 | + "optional": true, | |
| 4883 | 4914 | "requires": { |
| 4884 | 4915 | "minimist": "0.0.8" |
| 4885 | 4916 | } |
| ... | ... | @@ -4960,7 +4991,8 @@ |
| 4960 | 4991 | "number-is-nan": { |
| 4961 | 4992 | "version": "1.0.1", |
| 4962 | 4993 | "bundled": true, |
| 4963 | - "dev": true | |
| 4994 | + "dev": true, | |
| 4995 | + "optional": true | |
| 4964 | 4996 | }, |
| 4965 | 4997 | "object-assign": { |
| 4966 | 4998 | "version": "4.1.1", |
| ... | ... | @@ -4972,6 +5004,7 @@ |
| 4972 | 5004 | "version": "1.4.0", |
| 4973 | 5005 | "bundled": true, |
| 4974 | 5006 | "dev": true, |
| 5007 | + "optional": true, | |
| 4975 | 5008 | "requires": { |
| 4976 | 5009 | "wrappy": "1" |
| 4977 | 5010 | } |
| ... | ... | @@ -5057,7 +5090,8 @@ |
| 5057 | 5090 | "safe-buffer": { |
| 5058 | 5091 | "version": "5.1.1", |
| 5059 | 5092 | "bundled": true, |
| 5060 | - "dev": true | |
| 5093 | + "dev": true, | |
| 5094 | + "optional": true | |
| 5061 | 5095 | }, |
| 5062 | 5096 | "safer-buffer": { |
| 5063 | 5097 | "version": "2.1.2", |
| ... | ... | @@ -5093,6 +5127,7 @@ |
| 5093 | 5127 | "version": "1.0.2", |
| 5094 | 5128 | "bundled": true, |
| 5095 | 5129 | "dev": true, |
| 5130 | + "optional": true, | |
| 5096 | 5131 | "requires": { |
| 5097 | 5132 | "code-point-at": "^1.0.0", |
| 5098 | 5133 | "is-fullwidth-code-point": "^1.0.0", |
| ... | ... | @@ -5112,6 +5147,7 @@ |
| 5112 | 5147 | "version": "3.0.1", |
| 5113 | 5148 | "bundled": true, |
| 5114 | 5149 | "dev": true, |
| 5150 | + "optional": true, | |
| 5115 | 5151 | "requires": { |
| 5116 | 5152 | "ansi-regex": "^2.0.0" |
| 5117 | 5153 | } |
| ... | ... | @@ -5155,12 +5191,14 @@ |
| 5155 | 5191 | "wrappy": { |
| 5156 | 5192 | "version": "1.0.2", |
| 5157 | 5193 | "bundled": true, |
| 5158 | - "dev": true | |
| 5194 | + "dev": true, | |
| 5195 | + "optional": true | |
| 5159 | 5196 | }, |
| 5160 | 5197 | "yallist": { |
| 5161 | 5198 | "version": "3.0.2", |
| 5162 | 5199 | "bundled": true, |
| 5163 | - "dev": true | |
| 5200 | + "dev": true, | |
| 5201 | + "optional": true | |
| 5164 | 5202 | } |
| 5165 | 5203 | } |
| 5166 | 5204 | }, |
| ... | ... | @@ -5309,6 +5347,14 @@ |
| 5309 | 5347 | "slash": "^1.0.0" |
| 5310 | 5348 | } |
| 5311 | 5349 | }, |
| 5350 | + "good-listener": { | |
| 5351 | + "version": "1.2.2", | |
| 5352 | + "resolved": "https://registry.npmjs.org/good-listener/-/good-listener-1.2.2.tgz", | |
| 5353 | + "integrity": "sha1-1TswzfkxPf+33JoNR3CWqm0UXFA=", | |
| 5354 | + "requires": { | |
| 5355 | + "delegate": "^3.1.2" | |
| 5356 | + } | |
| 5357 | + }, | |
| 5312 | 5358 | "got": { |
| 5313 | 5359 | "version": "8.3.2", |
| 5314 | 5360 | "resolved": "https://registry.npmjs.org/got/-/got-8.3.2.tgz", |
| ... | ... | @@ -6403,7 +6449,8 @@ |
| 6403 | 6449 | "version": "0.1.1", |
| 6404 | 6450 | "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", |
| 6405 | 6451 | "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", |
| 6406 | - "dev": true | |
| 6452 | + "dev": true, | |
| 6453 | + "optional": true | |
| 6407 | 6454 | }, |
| 6408 | 6455 | "jsesc": { |
| 6409 | 6456 | "version": "1.3.0", |
| ... | ... | @@ -11888,6 +11935,11 @@ |
| 11888 | 11935 | "ajv": "^5.0.0" |
| 11889 | 11936 | } |
| 11890 | 11937 | }, |
| 11938 | + "select": { | |
| 11939 | + "version": "1.1.2", | |
| 11940 | + "resolved": "https://registry.npmjs.org/select/-/select-1.1.2.tgz", | |
| 11941 | + "integrity": "sha1-DnNQrN7ICxEIUoeG7B1EGNEbOW0=" | |
| 11942 | + }, | |
| 11891 | 11943 | "select-hose": { |
| 11892 | 11944 | "version": "2.0.0", |
| 11893 | 11945 | "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz", |
| ... | ... | @@ -12712,6 +12764,11 @@ |
| 12712 | 12764 | "integrity": "sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q=", |
| 12713 | 12765 | "dev": true |
| 12714 | 12766 | }, |
| 12767 | + "tiny-emitter": { | |
| 12768 | + "version": "2.1.0", | |
| 12769 | + "resolved": "https://registry.npmjs.org/tiny-emitter/-/tiny-emitter-2.1.0.tgz", | |
| 12770 | + "integrity": "sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q==" | |
| 12771 | + }, | |
| 12715 | 12772 | "to-arraybuffer": { |
| 12716 | 12773 | "version": "1.0.1", |
| 12717 | 12774 | "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", |
| ... | ... | @@ -12824,7 +12881,8 @@ |
| 12824 | 12881 | "version": "0.14.5", |
| 12825 | 12882 | "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", |
| 12826 | 12883 | "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", |
| 12827 | - "dev": true | |
| 12884 | + "dev": true, | |
| 12885 | + "optional": true | |
| 12828 | 12886 | }, |
| 12829 | 12887 | "type-is": { |
| 12830 | 12888 | "version": "1.6.16", |
| ... | ... | @@ -13375,6 +13433,14 @@ |
| 13375 | 13433 | "resolved": "https://registry.npmjs.org/vue-bus/-/vue-bus-1.2.1.tgz", |
| 13376 | 13434 | "integrity": "sha512-uCSJEWFWoDZz+GV/Pj/wXAC7WVBLD18V62l+2ezd4UCsZWZB27Hz3K0M9WUcbNum/yKBoN+OkOCIrU6A9xqWhw==" |
| 13377 | 13435 | }, |
| 13436 | + "vue-clipboard2": { | |
| 13437 | + "version": "0.3.1", | |
| 13438 | + "resolved": "https://registry.npmjs.org/vue-clipboard2/-/vue-clipboard2-0.3.1.tgz", | |
| 13439 | + "integrity": "sha512-H5S/agEDj0kXjUb5GP2c0hCzIXWRBygaWLN3NEFsaI9I3uWin778SFEMt8QRXiPG+7anyjqWiw2lqcxWUSfkYg==", | |
| 13440 | + "requires": { | |
| 13441 | + "clipboard": "^2.0.0" | |
| 13442 | + } | |
| 13443 | + }, | |
| 13378 | 13444 | "vue-concise-slider": { |
| 13379 | 13445 | "version": "3.4.4", |
| 13380 | 13446 | "resolved": "https://registry.npmjs.org/vue-concise-slider/-/vue-concise-slider-3.4.4.tgz", | ... | ... |
package.json
src/components/darenListBox/darenListBox.less
0 → 100644
| 1 | +@charset "UTF-8"; | |
| 2 | + | |
| 3 | +.daren-list-box { | |
| 4 | + .title-box + .box { | |
| 5 | + margin-top: 30px; | |
| 6 | + } | |
| 7 | + > .box { | |
| 8 | + margin: 0 auto; | |
| 9 | + width: 690px; | |
| 10 | + > .item-box + .item-box { | |
| 11 | + margin-top: 30px; | |
| 12 | + } | |
| 13 | + .borderBottom{ | |
| 14 | + padding-bottom: 32px; | |
| 15 | + border-bottom: solid 1px #F2F2F2; | |
| 16 | + } | |
| 17 | + } | |
| 18 | +} | ... | ... |
src/components/darenListBox/darenListBox.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <div class="daren-list-box" v-if="lists && lists.length"> | |
| 3 | + | |
| 4 | + <!-- 标题slot --> | |
| 5 | + <slot name="title-box"></slot> | |
| 6 | + | |
| 7 | + <div class="box"> | |
| 8 | + | |
| 9 | + <!-- 循环输出达人动态列表 --> | |
| 10 | + <div class="item-box" :class="{borderBottom:lists.length>1}" v-for="(item, index) in lists" :key="index"> | |
| 11 | + <daren-list-com @userJump="userJump" @jump="jump" @goodsJump="goodsJump" @goodsPrimary="goodsPrimary" | |
| 12 | + :item="item"> | |
| 13 | + </daren-list-com> | |
| 14 | + </div> | |
| 15 | + </div> | |
| 16 | + </div> | |
| 17 | +</template> | |
| 18 | + | |
| 19 | +<script> | |
| 20 | + | |
| 21 | + // 引入组件 | |
| 22 | + import darenListCom from "@/components/darenListCom/darenListCom"; | |
| 23 | + | |
| 24 | + export default { | |
| 25 | + name: "darenListBox", | |
| 26 | + data() { | |
| 27 | + return { | |
| 28 | + | |
| 29 | + } | |
| 30 | + }, | |
| 31 | + props: ["lists"], | |
| 32 | + components: { | |
| 33 | + darenListCom | |
| 34 | + }, | |
| 35 | + methods: { | |
| 36 | + | |
| 37 | + /** | |
| 38 | + * 点击跳转 | |
| 39 | + * @param {object} item [数据对象] | |
| 40 | + */ | |
| 41 | + jump(item) { | |
| 42 | + this.$emit("jump", item); | |
| 43 | + }, | |
| 44 | + | |
| 45 | + /** | |
| 46 | + * 用户头像/昵称,点击跳转 | |
| 47 | + * @param {object} item [数据对象] | |
| 48 | + */ | |
| 49 | + userJump(item) { | |
| 50 | + this.$emit("userJump", item); | |
| 51 | + }, | |
| 52 | + | |
| 53 | + /** | |
| 54 | + * 点击跳转商品 | |
| 55 | + * @param {object} item [数据对象] | |
| 56 | + */ | |
| 57 | + goodsJump(item) { | |
| 58 | + this.$emit("goodsJump", item); | |
| 59 | + }, | |
| 60 | + | |
| 61 | + /** | |
| 62 | + * 点击跳转商品购买 | |
| 63 | + * @param {object} item [数据对象] | |
| 64 | + */ | |
| 65 | + goodsPrimary(item) { | |
| 66 | + this.$emit("goodsPrimary", item); | |
| 67 | + } | |
| 68 | + } | |
| 69 | + } | |
| 70 | +</script> | |
| 71 | + | |
| 72 | +<!-- Add "scoped" attribute to limit CSS to this component only --> | |
| 73 | +<style rel="stylesheet/less" lang="less" scoped> | |
| 74 | + @import './darenListBox'; | |
| 75 | +</style> | ... | ... |
src/components/darenListCom/darenListCom.less
0 → 100644
| 1 | +@charset "UTF-8"; | |
| 2 | + | |
| 3 | +.daren-list-com { | |
| 4 | + > .box { | |
| 5 | + margin: 0 auto; | |
| 6 | + width: 690px; | |
| 7 | + .top-box { | |
| 8 | + display: flex; | |
| 9 | + justify-content: space-between; | |
| 10 | + align-items: center; | |
| 11 | + .top-left { | |
| 12 | + | |
| 13 | + } | |
| 14 | + .top-right { | |
| 15 | + color: #666666; | |
| 16 | + font-size: 26px; | |
| 17 | + font-weight: 400; | |
| 18 | + } | |
| 19 | + } | |
| 20 | + .intro-box { | |
| 21 | + display: -webkit-box; | |
| 22 | + margin-top: 20px; | |
| 23 | + color: #666666; | |
| 24 | + font-size: 26px; | |
| 25 | + font-weight: 400; | |
| 26 | + line-height: 37px; | |
| 27 | + width: 100%; | |
| 28 | + -webkit-line-clamp: 3; | |
| 29 | + /*! autoprefixer: off */ | |
| 30 | + -webkit-box-orient: vertical; | |
| 31 | + /*! autoprefixer: on */ | |
| 32 | + text-overflow: ellipsis; | |
| 33 | + overflow: hidden; | |
| 34 | + } | |
| 35 | + .center-box { | |
| 36 | + margin-top: 20px; | |
| 37 | + } | |
| 38 | + .bottom-box { | |
| 39 | + .hot-info-box { | |
| 40 | + display: flex; | |
| 41 | + justify-content: flex-start; | |
| 42 | + align-items: center; | |
| 43 | + margin-top: 20px; | |
| 44 | + .hot-img-box { | |
| 45 | + width: auto; | |
| 46 | + height: 25px; | |
| 47 | + .hot-img { | |
| 48 | + display: block; | |
| 49 | + height: 25px; | |
| 50 | + } | |
| 51 | + } | |
| 52 | + .line { | |
| 53 | + background-color: transparent; | |
| 54 | + margin: 0 20px; | |
| 55 | + width: 0; | |
| 56 | + height: 24px; | |
| 57 | + border-left: 1px solid #999999; | |
| 58 | + } | |
| 59 | + .info { | |
| 60 | + color: #999999; | |
| 61 | + font-size: 24px; | |
| 62 | + font-weight: 400; | |
| 63 | + white-space: nowrap; | |
| 64 | + text-overflow: ellipsis; | |
| 65 | + overflow: hidden; | |
| 66 | + } | |
| 67 | + } | |
| 68 | + .goods-box { | |
| 69 | + margin-top: 20px; | |
| 70 | + .goods + .goods { | |
| 71 | + margin-top: 20px; | |
| 72 | + } | |
| 73 | + } | |
| 74 | + .comment-like-view-box { | |
| 75 | + display: flex; | |
| 76 | + justify-content: space-between; | |
| 77 | + align-items: center; | |
| 78 | + margin-top: 20px; | |
| 79 | + .left { | |
| 80 | + display: flex; | |
| 81 | + justify-content: flex-start; | |
| 82 | + align-items: center; | |
| 83 | + > div + div { | |
| 84 | + margin-left: 50px; | |
| 85 | + } | |
| 86 | + .comment-box, .like-box { | |
| 87 | + display: flex; | |
| 88 | + justify-content: flex-start; | |
| 89 | + align-items: center; | |
| 90 | + } | |
| 91 | + .icon-img { | |
| 92 | + display: block; | |
| 93 | + width: 36px; | |
| 94 | + height: 36px; | |
| 95 | + } | |
| 96 | + .number { | |
| 97 | + margin-left: 10px; | |
| 98 | + color: #999999; | |
| 99 | + font-size: 28px; | |
| 100 | + font-weight: 300; | |
| 101 | + } | |
| 102 | + } | |
| 103 | + .right { | |
| 104 | + color: #777777; | |
| 105 | + font-size: 28px; | |
| 106 | + font-weight: 300; | |
| 107 | + } | |
| 108 | + } | |
| 109 | + } | |
| 110 | + } | |
| 111 | +} | |
| 0 | 112 | \ No newline at end of file | ... | ... |
src/components/darenListCom/darenListCom.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <div class="daren-list-com" v-if="item"> | |
| 3 | + <div class="box" @click.stop.prevent @click="jump(item)"> | |
| 4 | + <div class="top-box" v-if="item.shop_user" @click.stop.prevent @click="userJump(item,2)"> | |
| 5 | + <div class="top-left"> | |
| 6 | + | |
| 7 | + <!-- 用户头像/昵称 --> | |
| 8 | + <user-avatar class="user-avatar-box" | |
| 9 | + :users="item.shop_user"> | |
| 10 | + </user-avatar> | |
| 11 | + </div> | |
| 12 | + <div class="top-right"> | |
| 13 | + <!-- 发布时间 --> | |
| 14 | + <div class="day" v-if="getDatetime(item.addtime, item.time).day"> | |
| 15 | + {{getDatetime(item.addtime, item.time).day}} | |
| 16 | + </div> | |
| 17 | + <div class="date">{{getDatetime(item.addtime, item.time).date}}</div> | |
| 18 | + </div> | |
| 19 | + </div> | |
| 20 | + | |
| 21 | + <!-- 动态简介 --> | |
| 22 | + <div class="intro-box" v-if="item.title"> | |
| 23 | + {{item.title}} | |
| 24 | + </div> | |
| 25 | + | |
| 26 | + <!-- 中间图片部分 --> | |
| 27 | + <div class="center-box" v-if="item.img"> | |
| 28 | + | |
| 29 | + <!-- 达人图片展示(单独组建处理,宫格形式) --> | |
| 30 | + <palace-grid | |
| 31 | + :grids="{ | |
| 32 | + list:imgArr | |
| 33 | + }"> | |
| 34 | + </palace-grid> | |
| 35 | + </div> | |
| 36 | + | |
| 37 | + <!-- 底部部分 --> | |
| 38 | + <div class="bottom-box" v-if="item.goods"> | |
| 39 | + | |
| 40 | + <!-- 热门信息 --> | |
| 41 | + <div class="hot-info-box" v-if="item&&item.comment_content&&item.comment_content.content"> | |
| 42 | + <div class="hot-img-box"> | |
| 43 | + <img src="static/img/icon_popular_comment.png" class="hot-img" mode="heightFix" /> | |
| 44 | + </div> | |
| 45 | + <div class="line"></div> | |
| 46 | + <div class="info"> | |
| 47 | + {{item.comment_content.content}} | |
| 48 | + </div> | |
| 49 | + </div> | |
| 50 | + | |
| 51 | + <div class="goods-box"> | |
| 52 | + | |
| 53 | + <!-- 商品标签组建 --> | |
| 54 | + <div class="goods"> | |
| 55 | + <!-- goodsItem_4 --> | |
| 56 | + <goods-item-4 @jump="goodsJump" @primary="goodsPrimary" | |
| 57 | + :item="item.goods"> | |
| 58 | + </goods-item-4> | |
| 59 | + </div> | |
| 60 | + </div> | |
| 61 | + | |
| 62 | + <!-- 评论/点赞/查看按钮 --> | |
| 63 | + <div class="comment-like-view-box"> | |
| 64 | + <div class="left"> | |
| 65 | + | |
| 66 | + <!-- 评论 --> | |
| 67 | + <div class="comment-box" v-if="item.comment"> | |
| 68 | + <img src="static/img/icon_daren_list_comment.png" class="icon-img" /> | |
| 69 | + <div class="number">{{item.comment}}</div> | |
| 70 | + </div> | |
| 71 | + | |
| 72 | + <!-- 点赞 --> | |
| 73 | + <div class="like-box" v-if="item.upper"> | |
| 74 | + <img src="static/img/icon_daren_list_like.png" class="icon-img" /> | |
| 75 | + <div class="number">{{item.upper}}</div> | |
| 76 | + </div> | |
| 77 | + </div> | |
| 78 | + <div class="right"> | |
| 79 | + 查看 | |
| 80 | + </div> | |
| 81 | + </div> | |
| 82 | + </div> | |
| 83 | + | |
| 84 | + </div> | |
| 85 | + </div> | |
| 86 | +</template> | |
| 87 | + | |
| 88 | +<script> | |
| 89 | + | |
| 90 | + // 引入组件 | |
| 91 | + import userAvatar from "@/components/userAvatarBox/userAvatarBox"; | |
| 92 | + import palaceGrid from "@/components/palaceGrid/palaceGrid"; | |
| 93 | + import goodsItem4 from "@/components/goodsItem_4/goodsItem_4"; | |
| 94 | + | |
| 95 | + export default { | |
| 96 | + name: "darenListCom", | |
| 97 | + data() { | |
| 98 | + return { | |
| 99 | + imgArr: [] | |
| 100 | + } | |
| 101 | + }, | |
| 102 | + props: ["item"], | |
| 103 | + computed: { | |
| 104 | + | |
| 105 | + // 计算显示日期 | |
| 106 | + getDatetime() { | |
| 107 | + | |
| 108 | + function isLeapYear(year) { | |
| 109 | + if (year % 4 == 0&&year % 100 != 0||year % 400 ==0) { | |
| 110 | + return true; | |
| 111 | + } else { | |
| 112 | + return false; | |
| 113 | + } | |
| 114 | + } | |
| 115 | + | |
| 116 | + return function(addTime, nowTime, index = undefined) { | |
| 117 | + | |
| 118 | + // 返回数据 | |
| 119 | + let result = { | |
| 120 | + year: "", | |
| 121 | + day: "", | |
| 122 | + date: "" | |
| 123 | + }; | |
| 124 | + | |
| 125 | + // 设置时间对象 | |
| 126 | + let now = new Date(nowTime * 1000); | |
| 127 | + let add = new Date(addTime * 1000); | |
| 128 | + | |
| 129 | + // 一年中的第几天 | |
| 130 | + let nowDays = Math.ceil(( now - new Date(now.getFullYear().toString())) / (24 * 60 * 60 * 1000)) + 1; | |
| 131 | + let addDays = Math.ceil(( add - new Date(add.getFullYear().toString())) / (24 * 60 * 60 * 1000)) + 1; | |
| 132 | + | |
| 133 | + // 根据情况,判断今天/昨天/前天 | |
| 134 | + if (nowDays === addDays && now.getFullYear() === add.getFullYear()) { // 今天 | |
| 135 | + result.year = ""; | |
| 136 | + result.day = ""; | |
| 137 | + result.date = (add.getHours() >= 10 ? add.getHours() : "0" + add.getHours()) + ":" + (add.getMinutes() >= 10 ? add.getMinutes() : "0" + add.getMinutes()); | |
| 138 | + } else if (nowDays > addDays && now.getFullYear() === add.getFullYear()) { // 正常大于,判断大于多少,设置昨天/前天/日期 | |
| 139 | + result.year = ""; | |
| 140 | + if (nowDays - addDays === 1) { | |
| 141 | + result.day = "昨天"; | |
| 142 | + result.date = (add.getHours() >= 10 ? add.getHours() : "0" + add.getHours()) + ":" + (add.getMinutes() >= 10 ? add.getMinutes() : "0" + add.getMinutes()); | |
| 143 | + } else if (nowDays - addDays === 2) { | |
| 144 | + result.day = "前天"; | |
| 145 | + result.date = (add.getHours() >= 10 ? add.getHours() : "0" + add.getHours()) + ":" + (add.getMinutes() >= 10 ? add.getMinutes() : "0" + add.getMinutes()); | |
| 146 | + } else { | |
| 147 | + result.day = ""; | |
| 148 | + result.date = (add.getMonth() + 1) + "-" + add.getDate() + " " + (add.getHours() >= 10 ? add.getHours() : "0" + add.getHours()) + ":" + (add.getMinutes() >= 10 ? add.getMinutes() : "0" + add.getMinutes()); | |
| 149 | + } | |
| 150 | + } else if (now.getFullYear() > add.getFullYear()) { // 跨年,判断设置年份和闰年等,设置昨天/前天/日期 | |
| 151 | + | |
| 152 | + // 设置年 | |
| 153 | + if (!this.years.includes(add.getFullYear())) { | |
| 154 | + result.year = add.getFullYear(); | |
| 155 | + this.years.push(add.getFullYear()); | |
| 156 | + } else { | |
| 157 | + result.year = ""; | |
| 158 | + } | |
| 159 | + | |
| 160 | + // 一年的天数 | |
| 161 | + let fullYearDay = 365; | |
| 162 | + | |
| 163 | + // 判断是否为闰年 | |
| 164 | + if (isLeapYear(add.getFullYear())) { | |
| 165 | + fullYearDay = 366; | |
| 166 | + } | |
| 167 | + | |
| 168 | + // 判断是夸一年还是多年 | |
| 169 | + if (now.getFullYear() - add.getFullYear() === 1) { | |
| 170 | + | |
| 171 | + // 设置昨天/前天/日期 | |
| 172 | + if (nowDays + fullYearDay - addDays === 1) { | |
| 173 | + result.day = "昨天"; | |
| 174 | + result.date = (add.getHours() >= 10 ? add.getHours() : "0" + add.getHours()) + ":" + (add.getMinutes() >= 10 ? add.getMinutes() : "0" + add.getMinutes()); | |
| 175 | + } else if (nowDays + fullYearDay - addDays === 2) { | |
| 176 | + result.day = "前天"; | |
| 177 | + result.date = (add.getHours() >= 10 ? add.getHours() : "0" + add.getHours()) + ":" + (add.getMinutes() >= 10 ? add.getMinutes() : "0" + add.getMinutes()); | |
| 178 | + } | |
| 179 | + } else { | |
| 180 | + result.day = ""; | |
| 181 | + result.date = (add.getMonth() + 1) + "-" + add.getDate(); | |
| 182 | + } | |
| 183 | + } | |
| 184 | + | |
| 185 | + return result; | |
| 186 | + } | |
| 187 | + } | |
| 188 | + }, | |
| 189 | + components: { | |
| 190 | + userAvatar, | |
| 191 | + palaceGrid, | |
| 192 | + goodsItem4 | |
| 193 | + }, | |
| 194 | + mounted() { | |
| 195 | + | |
| 196 | + // 如果有图片数组,处理图片数组 | |
| 197 | + if (this.item.img && this.item.img.length) { | |
| 198 | + | |
| 199 | + // 遍历数组 | |
| 200 | + this.item.img.forEach((item, index) => { | |
| 201 | + this.imgArr.push({ | |
| 202 | + img: item, | |
| 203 | + w: 0, | |
| 204 | + h: 0 | |
| 205 | + }); | |
| 206 | + | |
| 207 | + // 判断如果有视频,添加有视频属性到imgArr中 | |
| 208 | + if (index === 0 && this.item.video && this.item.video_img) { | |
| 209 | + this.$set(this.imgArr[index], "v", true); | |
| 210 | + } | |
| 211 | + }); | |
| 212 | + } | |
| 213 | + }, | |
| 214 | + methods: { | |
| 215 | + | |
| 216 | + /** | |
| 217 | + * 点击跳转 | |
| 218 | + * @param {object} item [数据对象] | |
| 219 | + */ | |
| 220 | + jump(item) { | |
| 221 | + this.$emit("jump", item); | |
| 222 | + }, | |
| 223 | + | |
| 224 | + /** | |
| 225 | + * 用户头像/昵称,点击跳转 | |
| 226 | + * @param {object} item [数据对象] | |
| 227 | + */ | |
| 228 | + userJump(item,type) { | |
| 229 | + this.$set(item, "type", "2"); | |
| 230 | + this.$emit("userJump", item); | |
| 231 | + }, | |
| 232 | + | |
| 233 | + /** | |
| 234 | + * 点击跳转商品 | |
| 235 | + * @param {object} item [数据对象] | |
| 236 | + */ | |
| 237 | + goodsJump(item) { | |
| 238 | + this.$emit("goodsJump", item); | |
| 239 | + }, | |
| 240 | + | |
| 241 | + /** | |
| 242 | + * 点击跳转商品购买 | |
| 243 | + * @param {object} item [数据对象] | |
| 244 | + */ | |
| 245 | + goodsPrimary(item) { | |
| 246 | + this.$emit("goodsPrimary", item); | |
| 247 | + }, | |
| 248 | + } | |
| 249 | + } | |
| 250 | +</script> | |
| 251 | + | |
| 252 | +<!-- Add "scoped" attribute to limit CSS to this component only --> | |
| 253 | +<style rel="stylesheet/less" lang="less" scoped> | |
| 254 | + @import './darenListCom'; | |
| 255 | +</style> | ... | ... |
src/components/dresserList/dresserList.less
| ... | ... | @@ -42,4 +42,14 @@ |
| 42 | 42 | justify-content: flex-end; |
| 43 | 43 | align-items: flex-end; |
| 44 | 44 | } |
| 45 | + .btn{ | |
| 46 | + width:120px; | |
| 47 | + height:48px; | |
| 48 | + background:rgba(255,236,239,1); | |
| 49 | + border-radius:26px; | |
| 50 | + color: #FC1541; | |
| 51 | + font-size: 26px; | |
| 52 | + text-align: center; | |
| 53 | + line-height: 48px; | |
| 54 | + } | |
| 45 | 55 | } | ... | ... |
src/components/dresserList/dresserList.vue
| 1 | 1 | <template> |
| 2 | 2 | <div> |
| 3 | - <div class="item_box" @click="toDetail(dresserList)"> | |
| 4 | - <img class="head_portrait" v-lazy="dresserList.user_img" /> | |
| 3 | + <div class="item_box" v-for="(item,index) in dresserList" @click="toDetail(item)"> | |
| 4 | + <img class="head_portrait" v-lazy="item.user_img || item.logo" /> | |
| 5 | 5 | <div class="user_info"> |
| 6 | 6 | <div class="name"> |
| 7 | - {{dresserList.title}} | |
| 7 | + {{item.title}} | |
| 8 | 8 | </div> |
| 9 | 9 | <div class="desc"> |
| 10 | - {{dresserList.user_title}} | |
| 10 | + {{item.user_title || item.titles}} | |
| 11 | 11 | </div> |
| 12 | 12 | </div> |
| 13 | - <img class="arrow_right" src="static/img/icon_arrow_right.png" /> | |
| 13 | + <div v-if="item.is_fans"> | |
| 14 | + <div v-if="item.is_fans==0" @click.stop.prevent @click="fansShop(item)" class="btn"> | |
| 15 | + 关注 | |
| 16 | + </div> | |
| 17 | + <div v-else @click.stop.prevent @click="fansShop(item)" class="btn"> | |
| 18 | + 已关注 | |
| 19 | + </div> | |
| 20 | + </div> | |
| 21 | + <img v-else class="arrow_right" src="static/img/icon_arrow_right.png" /> | |
| 14 | 22 | </div> |
| 15 | 23 | </div> |
| 16 | 24 | </template> |
| ... | ... | @@ -32,7 +40,14 @@ |
| 32 | 40 | */ |
| 33 | 41 | toDetail(item) { |
| 34 | 42 | this.$emit("toDetail", item); |
| 35 | - } | |
| 43 | + }, | |
| 44 | + /** | |
| 45 | + * 关注达人 | |
| 46 | + * @param {object} item [数据对象] | |
| 47 | + */ | |
| 48 | + fansShop(item) { | |
| 49 | + this.$emit("fansShop", item); | |
| 50 | + }, | |
| 36 | 51 | } |
| 37 | 52 | } |
| 38 | 53 | </script> | ... | ... |
src/components/giftGivingItem/giftGivingItem.less
0 → 100644
| 1 | +.giftItem_box { | |
| 2 | + width: 640px; | |
| 3 | + // height: 453px; | |
| 4 | + background: rgba(255, 255, 255, 1); | |
| 5 | + box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.08); | |
| 6 | + border-radius: 16px; | |
| 7 | + margin: 43px auto 0 auto; | |
| 8 | + padding: 25px; | |
| 9 | + .user_info { | |
| 10 | + display: flex; | |
| 11 | + justify-content: space-between; | |
| 12 | + position: relative; | |
| 13 | + padding-bottom: 22px; | |
| 14 | + border-bottom: solid 1px rgba(247, 247, 248, 1); | |
| 15 | + .name { | |
| 16 | + height: 50px; | |
| 17 | + font-size: 28px; | |
| 18 | + font-weight: 400; | |
| 19 | + color: rgba(51, 51, 51, 1); | |
| 20 | + line-height: 50px; | |
| 21 | + width: 400px; | |
| 22 | + overflow: hidden; | |
| 23 | + text-overflow: ellipsis; | |
| 24 | + white-space: nowrap; | |
| 25 | + } | |
| 26 | + .btn { | |
| 27 | + width: 144px; | |
| 28 | + height: 52px; | |
| 29 | + line-height: 52px; | |
| 30 | + background: rgba(254, 246, 233, 1); | |
| 31 | + border-radius: 96px 0px 0px 96px; | |
| 32 | + text-align: center; | |
| 33 | + font-size: 26px; | |
| 34 | + font-weight: 400; | |
| 35 | + color: rgba(245, 166, 35, 1); | |
| 36 | + position: absolute; | |
| 37 | + right: -35px; | |
| 38 | + } | |
| 39 | + .gift_active { | |
| 40 | + height: 40px; | |
| 41 | + font-size: 28px; | |
| 42 | + font-weight: 400; | |
| 43 | + color: rgba(208, 2, 27, 1); | |
| 44 | + line-height: 40px; | |
| 45 | + } | |
| 46 | + } | |
| 47 | + .item_info { | |
| 48 | + display: flex; | |
| 49 | + margin-top: 30px; | |
| 50 | + padding-bottom: 30px; | |
| 51 | + border-bottom: solid 1px rgba(247, 247, 248, 1); | |
| 52 | + img { | |
| 53 | + width: 159px; | |
| 54 | + height: 160px; | |
| 55 | + border-radius: 10px; | |
| 56 | + } | |
| 57 | + .box { | |
| 58 | + margin-left: 30px; | |
| 59 | + position: relative; | |
| 60 | + flex: 1; | |
| 61 | + .name { | |
| 62 | + font-size: 28px; | |
| 63 | + font-weight: 400; | |
| 64 | + color: rgba(51, 51, 51, 1); | |
| 65 | + max-height: 80px; | |
| 66 | + /*! autoprefixer: off */ | |
| 67 | + -webkit-box-orient: vertical; | |
| 68 | + /*! autoprefixer: on */ | |
| 69 | + display: -webkit-box; | |
| 70 | + -webkit-line-clamp: 2; | |
| 71 | + overflow: hidden; | |
| 72 | + white-space: normal; | |
| 73 | + } | |
| 74 | + .pirce { | |
| 75 | + width: 100%; | |
| 76 | + position: absolute; | |
| 77 | + left: 0; | |
| 78 | + bottom: 0; | |
| 79 | + display: flex; | |
| 80 | + justify-content: space-between; | |
| 81 | + .title { | |
| 82 | + span { | |
| 83 | + width: 15px; | |
| 84 | + height: 33px; | |
| 85 | + font-size: 24px; | |
| 86 | + font-weight: 500; | |
| 87 | + color: rgba(208, 2, 27, 1); | |
| 88 | + line-height: 33px; | |
| 89 | + } | |
| 90 | + height: 50px; | |
| 91 | + font-size: 36px; | |
| 92 | + font-weight: 500; | |
| 93 | + color: rgba(208, 2, 27, 1); | |
| 94 | + line-height: 50px; | |
| 95 | + } | |
| 96 | + .btn { | |
| 97 | + height: 40px; | |
| 98 | + font-size: 28px; | |
| 99 | + font-weight: 400; | |
| 100 | + color: rgba(180, 180, 180, 1); | |
| 101 | + line-height: 40px; | |
| 102 | + } | |
| 103 | + } | |
| 104 | + } | |
| 105 | + } | |
| 106 | + .text_tip { | |
| 107 | + height: 40px; | |
| 108 | + font-size: 28px; | |
| 109 | + font-weight: 400; | |
| 110 | + color: rgba(180, 180, 180, 1); | |
| 111 | + line-height: 40px; | |
| 112 | + margin-top: 30px; | |
| 113 | + num { | |
| 114 | + color: #666666; | |
| 115 | + } | |
| 116 | + } | |
| 117 | + .btn_list { | |
| 118 | + padding-top: 30px; | |
| 119 | + border-top: solid 1px #f7f7f8; | |
| 120 | + margin-top: 30px; | |
| 121 | + display: flex; | |
| 122 | + justify-content: flex-end; | |
| 123 | + .box { | |
| 124 | + width: 312px; | |
| 125 | + display: flex; | |
| 126 | + justify-content: space-between; | |
| 127 | + div { | |
| 128 | + width: 146px; | |
| 129 | + height: 52px; | |
| 130 | + line-height: 52px; | |
| 131 | + border-radius: 8px; | |
| 132 | + text-align: center; | |
| 133 | + font-size: 26px; | |
| 134 | + } | |
| 135 | + .btn { | |
| 136 | + background: rgba(249, 249, 249, 1); | |
| 137 | + color: #999999; | |
| 138 | + } | |
| 139 | + .active { | |
| 140 | + background: rgba(253, 241, 242, 1); | |
| 141 | + color: #d0021b; | |
| 142 | + } | |
| 143 | + } | |
| 144 | + } | |
| 145 | +} | ... | ... |
src/components/giftGivingItem/giftGivingItem.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <div v-if="giftGivingItem && giftGivingItem.length > 0"> | |
| 3 | + <div | |
| 4 | + class="giftItem_box" | |
| 5 | + v-for="(item, index) in giftGivingItem" | |
| 6 | + :key="index" | |
| 7 | + > | |
| 8 | + <!--用户信息--> | |
| 9 | + <div class="user_info"> | |
| 10 | + <div class="name">{{ item.create_time }}(赠礼)</div> | |
| 11 | + <div class="gift_active">{{ item.status }}</div> | |
| 12 | + </div> | |
| 13 | + <!--商品信息--> | |
| 14 | + <div class="item_info"> | |
| 15 | + <img v-lazy="item.goods.simg" /> | |
| 16 | + <div class="box"> | |
| 17 | + <div class="name">{{ item.goods.title }}</div> | |
| 18 | + <div class="pirce"> | |
| 19 | + <div class="title"> | |
| 20 | + <span>¥</span>{{ item.goods.price }} | |
| 21 | + </div> | |
| 22 | + <div class="btn"> | |
| 23 | + 总数:{{ parseInt(item.goods.num) }} | |
| 24 | + </div> | |
| 25 | + </div> | |
| 26 | + </div> | |
| 27 | + </div> | |
| 28 | + <!-- 显示文字 --> | |
| 29 | + <div class="text_tip"> | |
| 30 | + <span v-show="item.total_num">可分享<num>{{item.total_num}}</num>人,</span> | |
| 31 | + <span v-show="item.give_num">已领 <num>{{item.give_num}}</num> 人,</span> | |
| 32 | + <span v-show="item.no_address_num"><num>{{item.no_address_num}}</num> 人未填写地址,</span> | |
| 33 | + <span v-show="item.refund_num"><num>{{item.refund_num}}</num>人退款中</span> | |
| 34 | + </div> | |
| 35 | + <!-- 按钮 --> | |
| 36 | + <div class="btn_list"> | |
| 37 | + <div class="box"> | |
| 38 | + <div class="btn">取消支付</div> | |
| 39 | + <div class="active">立即支付</div> | |
| 40 | + </div> | |
| 41 | + </div> | |
| 42 | + </div> | |
| 43 | + </div> | |
| 44 | +</template> | |
| 45 | + | |
| 46 | +<script> | |
| 47 | +export default { | |
| 48 | + name: "name", | |
| 49 | + data() { | |
| 50 | + return {}; | |
| 51 | + }, | |
| 52 | + props: ["giftGivingItem"], | |
| 53 | + created() {}, | |
| 54 | + methods: { | |
| 55 | + giftInReturn(item) { | |
| 56 | + this.$emit("giftInReturn", item); | |
| 57 | + } | |
| 58 | + } | |
| 59 | +}; | |
| 60 | +</script> | |
| 61 | + | |
| 62 | +<!-- Add "scoped" attribute to limit CSS to this component only --> | |
| 63 | +<style rel="stylesheet/less" lang="less" scoped> | |
| 64 | +@import "giftGivingItem"; | |
| 65 | +</style> | ... | ... |
src/components/goodsItem_4/goodsItem_4.less
0 → 100644
| 1 | +@charset "UTF-8"; | |
| 2 | + | |
| 3 | +.goods-item-4-box { | |
| 4 | + background-color: #F6F6F6; | |
| 5 | + padding: 20px 0; | |
| 6 | + width: 690px; | |
| 7 | + height: 100px; | |
| 8 | + border-radius: 12px; | |
| 9 | + .main-box { | |
| 10 | + display: flex; | |
| 11 | + justify-content: space-between; | |
| 12 | + margin: 0 auto; | |
| 13 | + width: 650px; | |
| 14 | + height: 100%; | |
| 15 | + .left-box { | |
| 16 | + display: flex; | |
| 17 | + justify-content: flex-start; | |
| 18 | + align-items: center; | |
| 19 | + .img-box { | |
| 20 | + display: flex; | |
| 21 | + justify-content: center; | |
| 22 | + align-items: center; | |
| 23 | + width: 100px; | |
| 24 | + height: 100px; | |
| 25 | + border-radius: 8px; | |
| 26 | + overflow: hidden; | |
| 27 | + .img { | |
| 28 | + display: block; | |
| 29 | + width: 100px; | |
| 30 | + } | |
| 31 | + } | |
| 32 | + .content-box { | |
| 33 | + display: flex; | |
| 34 | + flex-direction: column; | |
| 35 | + justify-content: space-around; | |
| 36 | + margin-left: 30px; | |
| 37 | + width: 430px; | |
| 38 | + height: 100%; | |
| 39 | + .title { | |
| 40 | + color: #333333; | |
| 41 | + font-size: 32px; | |
| 42 | + white-space: nowrap; | |
| 43 | + text-overflow: ellipsis; | |
| 44 | + overflow: hidden; | |
| 45 | + } | |
| 46 | + .price { | |
| 47 | + color: #FC1541; | |
| 48 | + font-size: 30px; | |
| 49 | + white-space: nowrap; | |
| 50 | + text-overflow: ellipsis; | |
| 51 | + overflow: hidden; | |
| 52 | + } | |
| 53 | + } | |
| 54 | + } | |
| 55 | + .right-box { | |
| 56 | + display: flex; | |
| 57 | + justify-content: center; | |
| 58 | + align-items: center; | |
| 59 | + .buttons-box { | |
| 60 | + .btn { | |
| 61 | + width: 80px; | |
| 62 | + height: 80px; | |
| 63 | + &.btn-primary { | |
| 64 | + display: flex; | |
| 65 | + justify-content: center; | |
| 66 | + align-items: center; | |
| 67 | + background-color: #F5A623; | |
| 68 | + color: #FFFFFF; | |
| 69 | + font-size: 26px; | |
| 70 | + border-radius: 50%; | |
| 71 | + } | |
| 72 | + } | |
| 73 | + } | |
| 74 | + } | |
| 75 | + } | |
| 76 | +} | ... | ... |
src/components/goodsItem_4/goodsItem_4.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <div class="goods-item-4-box" v-if="item.title||item.price||item.simg" @click.stop.prevent @click="jump(item)"> | |
| 3 | + <div class="main-box"> | |
| 4 | + <div class="left-box"> | |
| 5 | + <div class="img-box"> | |
| 6 | + <img v-lazy="item.simg" class="img" mode="widthFix" /> | |
| 7 | + </div> | |
| 8 | + <div class="content-box"> | |
| 9 | + <div class="title">{{item.title}}</div> | |
| 10 | + <div class="price">¥ {{item.price}}</div> | |
| 11 | + </div> | |
| 12 | + </div> | |
| 13 | + <div class="right-box"> | |
| 14 | + <div class="buttons-box"> | |
| 15 | + <div class="btn btn-primary" @click.stop.prevent @click="primary(item)"> | |
| 16 | + 购买 | |
| 17 | + </div> | |
| 18 | + </div> | |
| 19 | + </div> | |
| 20 | + </div> | |
| 21 | + </div> | |
| 22 | +</template> | |
| 23 | + | |
| 24 | +<script> | |
| 25 | + export default { | |
| 26 | + data: function () { | |
| 27 | + return { | |
| 28 | + | |
| 29 | + } | |
| 30 | + }, | |
| 31 | + props: ["item"], | |
| 32 | + created(){ | |
| 33 | +// console.log(this.item) | |
| 34 | + }, | |
| 35 | + methods: { | |
| 36 | + | |
| 37 | + /** | |
| 38 | + * 点击跳转 | |
| 39 | + * @param {object} item [数据对象] | |
| 40 | + */ | |
| 41 | + jump(item) { | |
| 42 | + this.$emit("jump", item); | |
| 43 | + }, | |
| 44 | + | |
| 45 | + /** | |
| 46 | + * 主按钮点击事件 | |
| 47 | + * @param {object} item [数据对象] | |
| 48 | + */ | |
| 49 | + primary(item) { | |
| 50 | + this.$emit("primary", item); | |
| 51 | + } | |
| 52 | + } | |
| 53 | + } | |
| 54 | +</script> | |
| 55 | + | |
| 56 | +<!-- Add "scoped" attribute to limit CSS to this component only --> | |
| 57 | +<style rel="stylesheet/less" lang="less" scoped> | |
| 58 | + @import './goodsItem_4'; | |
| 59 | +</style> | ... | ... |
src/components/horizList/horizList.vue
| ... | ... | @@ -45,6 +45,12 @@ |
| 45 | 45 | <swiper-item v-if="com == '4'" @jump="jump" |
| 46 | 46 | :item="item"> |
| 47 | 47 | </swiper-item> |
| 48 | + <shop-daren-hot v-if="com == '5'" | |
| 49 | + @userJump="userJump" | |
| 50 | + @fansShop="fansShop" | |
| 51 | + :item="item"> | |
| 52 | + | |
| 53 | + </shop-daren-hot> | |
| 48 | 54 | </div> |
| 49 | 55 | </div> |
| 50 | 56 | </div> |
| ... | ... | @@ -54,13 +60,16 @@ |
| 54 | 60 | </template> |
| 55 | 61 | |
| 56 | 62 | <script> |
| 63 | + | |
| 57 | 64 | // 引入组件 |
| 58 | 65 | import goodsItem1 from "@/components/goodsItem_1/goodsItem_1"; |
| 59 | 66 | import goodsItem2 from "@/components/goodsItem_2/goodsItem_2"; |
| 60 | 67 | import goodsItem3 from "@/components/goodsItem_3/goodsItem_3"; |
| 61 | - import swiperItem from "@/components/swiperItem/swiperItem"; | |
| 68 | + import swiperItem from "@/components/swiperItem/swiperItem"; | |
| 69 | + import shopDarenHot from "@/components/shopDarenHot/shopDarenHot"; | |
| 62 | 70 | export default { |
| 63 | - data: function () { | |
| 71 | + name: "horizList", | |
| 72 | + data() { | |
| 64 | 73 | return { |
| 65 | 74 | basicWidth: 100, |
| 66 | 75 | scrollItemBox: 100 |
| ... | ... | @@ -71,7 +80,8 @@ |
| 71 | 80 | goodsItem1, |
| 72 | 81 | goodsItem2, |
| 73 | 82 | goodsItem3, |
| 74 | - swiperItem | |
| 83 | + swiperItem, | |
| 84 | + shopDarenHot | |
| 75 | 85 | }, |
| 76 | 86 | methods: { |
| 77 | 87 | |
| ... | ... | @@ -82,7 +92,20 @@ |
| 82 | 92 | jump(item) { |
| 83 | 93 | this.$emit("jump", item); |
| 84 | 94 | }, |
| 85 | - | |
| 95 | + /** | |
| 96 | + * 跳转到达人个人中心页面 | |
| 97 | + * @param {object} item [数据对象] | |
| 98 | + */ | |
| 99 | + userJump(item) { | |
| 100 | + this.$emit("userJump", item); | |
| 101 | + }, | |
| 102 | + /** | |
| 103 | + * 关注 | |
| 104 | + * @param {object} item [数据对象] | |
| 105 | + */ | |
| 106 | + fansShop(item){ | |
| 107 | + this.$emit("fansShop", item); | |
| 108 | + }, | |
| 86 | 109 | /** |
| 87 | 110 | * 加入购物车 |
| 88 | 111 | * @param {object} item [数据对象] | ... | ... |
src/components/palaceGrid/palaceGrid.less
0 → 100644
| 1 | +@charset "UTF-8"; | |
| 2 | + | |
| 3 | +.palace-grid-box { | |
| 4 | + .box { | |
| 5 | + .img-box { | |
| 6 | + width: 100%; | |
| 7 | + display: flex; | |
| 8 | + flex-wrap: wrap; | |
| 9 | + //justify-content: space-around; | |
| 10 | + list-style: none; | |
| 11 | + .item{ | |
| 12 | + display: flex; | |
| 13 | + align-items: center; | |
| 14 | + justify-content: center; | |
| 15 | + padding:0 5px; | |
| 16 | + box-sizing: border-box; | |
| 17 | + position: relative; | |
| 18 | + .title{ | |
| 19 | + position: absolute; | |
| 20 | + flex: 1; | |
| 21 | + font-size:28px; | |
| 22 | + color: #fff; | |
| 23 | + } | |
| 24 | + .img { | |
| 25 | + display: block; | |
| 26 | + width: 100%; | |
| 27 | + height: 340px; | |
| 28 | + } | |
| 29 | + .play_box{ | |
| 30 | + width: 100%; | |
| 31 | + height: 100%; | |
| 32 | + position: absolute; | |
| 33 | + left: 0; | |
| 34 | + top:0; | |
| 35 | + //background-color: #000; | |
| 36 | + z-index: 1; | |
| 37 | + display: flex; | |
| 38 | + justify-content: center; | |
| 39 | + align-items: center; | |
| 40 | + img{ | |
| 41 | + width: 86px; | |
| 42 | + height: 86px; | |
| 43 | + } | |
| 44 | + } | |
| 45 | + } | |
| 46 | + .two{ | |
| 47 | + width: calc(calc(100% / 2)); | |
| 48 | + margin-top: 10px; | |
| 49 | + .img { | |
| 50 | + height: 340px; | |
| 51 | + } | |
| 52 | + } | |
| 53 | + .three{ | |
| 54 | + width: calc(calc(100% / 3)); | |
| 55 | + margin-top: 10px; | |
| 56 | + .img { | |
| 57 | + height: 222px; | |
| 58 | + } | |
| 59 | + } | |
| 60 | + } | |
| 61 | + } | |
| 62 | + .van-image-preview__index{ | |
| 63 | + font-size: 30px; | |
| 64 | + } | |
| 65 | + .van-swipe__indicators{ | |
| 66 | + bottom: 100px; | |
| 67 | + .van-swipe__indicator{ | |
| 68 | + width: 16px; | |
| 69 | + height: 16px; | |
| 70 | + } | |
| 71 | + } | |
| 72 | +} | ... | ... |
src/components/palaceGrid/palaceGrid.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <div class="palace-grid-box" v-if="grids && grids.list && grids.list.length"> | |
| 3 | + <div class="box"> | |
| 4 | + <div class="img-box" > | |
| 5 | + <div :class="['item',grids.list.length==1?'one':(grids.list.length==2 || grids.list.length==4? 'two':'three')]" v-for="(item, index) in grids.list" :key="index" @click="jump(item)"> | |
| 6 | + <!--<div @click.stop="imagePreview(index)" :class="['item',grids.list.length==1?'one':(grids.list.length==2 || grids.list.length==4? 'two':'three')]" v-for="(item, index) in grids.list" :key="index" @click="jump(item)">--> | |
| 7 | + <van-image | |
| 8 | + v-if="index<9" | |
| 9 | + class="img" | |
| 10 | + fit="cover" | |
| 11 | + lazy-load | |
| 12 | + :src="item.img || item" | |
| 13 | + /> | |
| 14 | + <div v-if="index<8&&item.v === true" class="play_box"> | |
| 15 | + <img src="static/img/play.png" /> | |
| 16 | + </div> | |
| 17 | + <div v-if="grids.list.length>9 && index == 8" class="title">共{{grids.list.length}}张</div> | |
| 18 | + </div> | |
| 19 | + </div> | |
| 20 | + </div> | |
| 21 | + <!--<van-image-preview v-model="show" :swipeDuration="20000" :start-position="index" :show-indicators="true" :images="grids.list" @change="onChange">--> | |
| 22 | + <!--<template v-slot:index>第{{ index }}页</template>--> | |
| 23 | + <!--</van-image-preview>--> | |
| 24 | + </div> | |
| 25 | +</template> | |
| 26 | + | |
| 27 | +<script> | |
| 28 | + export default { | |
| 29 | + name: "palaceGrid", | |
| 30 | + data: function () { | |
| 31 | + return {show: false, | |
| 32 | + index: 0, | |
| 33 | + images: [ | |
| 34 | + 'https://img.yzcdn.cn/1.jpg', | |
| 35 | + 'https://img.yzcdn.cn/2.jpg' | |
| 36 | + ] | |
| 37 | + | |
| 38 | + } | |
| 39 | + }, | |
| 40 | + created(){ | |
| 41 | +// debugger | |
| 42 | +// console.log(this.grids.list) | |
| 43 | + }, | |
| 44 | + props: ["grids"], | |
| 45 | + methods: { | |
| 46 | + /** | |
| 47 | + * 点击跳转事件绑定 | |
| 48 | + */ | |
| 49 | + jump(item) { | |
| 50 | + this.$emit("jump", item); | |
| 51 | + }, | |
| 52 | + /** | |
| 53 | + * 图片预览 | |
| 54 | + */ | |
| 55 | + imagePreview(index){ | |
| 56 | + this.show = true; | |
| 57 | + this.index = index; | |
| 58 | + | |
| 59 | + }, | |
| 60 | + /** | |
| 61 | + * 点击轮播图变大 | |
| 62 | + */ | |
| 63 | + onChange(index) { | |
| 64 | + this.index = index; | |
| 65 | + } | |
| 66 | + } | |
| 67 | + } | |
| 68 | +</script> | |
| 69 | + | |
| 70 | +<!-- Add "scoped" attribute to limit CSS to this component only --> | |
| 71 | +<style rel="stylesheet/less" lang="less"> | |
| 72 | + @import './palaceGrid'; | |
| 73 | +</style> | ... | ... |
src/components/receivingGiftsItem/receivingGiftsItem.less
0 → 100644
| 1 | +.giftItem_box { | |
| 2 | + width: 640px; | |
| 3 | + // height: 453px; | |
| 4 | + background: rgba(255, 255, 255, 1); | |
| 5 | + box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.08); | |
| 6 | + border-radius: 16px; | |
| 7 | + margin: 43px auto 0 auto; | |
| 8 | + padding: 25px; | |
| 9 | + .user_info { | |
| 10 | + display: flex; | |
| 11 | + position: relative; | |
| 12 | + padding-bottom: 22px; | |
| 13 | + border-bottom: solid 1px rgba(247, 247, 248, 1); | |
| 14 | + img { | |
| 15 | + width: 50px; | |
| 16 | + height: 50px; | |
| 17 | + border-radius: 50px; | |
| 18 | + } | |
| 19 | + .name { | |
| 20 | + height: 50px; | |
| 21 | + font-size: 28px; | |
| 22 | + font-weight: 400; | |
| 23 | + color: rgba(51, 51, 51, 1); | |
| 24 | + line-height: 50px; | |
| 25 | + margin-left: 20px; | |
| 26 | + width: 400px; | |
| 27 | + overflow: hidden; | |
| 28 | + text-overflow: ellipsis; | |
| 29 | + white-space: nowrap; | |
| 30 | + } | |
| 31 | + .btn { | |
| 32 | + width: 144px; | |
| 33 | + height: 52px; | |
| 34 | + line-height: 52px; | |
| 35 | + background: rgba(254, 246, 233, 1); | |
| 36 | + border-radius: 96px 0px 0px 96px; | |
| 37 | + text-align: center; | |
| 38 | + font-size: 26px; | |
| 39 | + font-weight: 400; | |
| 40 | + color: rgba(245, 166, 35, 1); | |
| 41 | + position: absolute; | |
| 42 | + right: -35px; | |
| 43 | + } | |
| 44 | + .gift_active { | |
| 45 | + height: 40px; | |
| 46 | + font-size: 28px; | |
| 47 | + font-weight: 400; | |
| 48 | + color: rgba(208, 2, 27, 1); | |
| 49 | + line-height: 40px; | |
| 50 | + } | |
| 51 | + } | |
| 52 | + .item_info { | |
| 53 | + display: flex; | |
| 54 | + margin-top: 30px; | |
| 55 | + padding-bottom: 30px; | |
| 56 | + border-bottom: solid 1px rgba(247, 247, 248, 1); | |
| 57 | + img { | |
| 58 | + width: 159px; | |
| 59 | + height: 160px; | |
| 60 | + border-radius: 10px; | |
| 61 | + } | |
| 62 | + .box { | |
| 63 | + margin-left: 30px; | |
| 64 | + position: relative; | |
| 65 | + flex: 1; | |
| 66 | + .name { | |
| 67 | + font-size: 28px; | |
| 68 | + font-weight: 400; | |
| 69 | + color: rgba(51, 51, 51, 1); | |
| 70 | + max-height: 80px; | |
| 71 | + /*! autoprefixer: off */ | |
| 72 | + -webkit-box-orient: vertical; | |
| 73 | + /*! autoprefixer: on */ | |
| 74 | + display: -webkit-box; | |
| 75 | + -webkit-line-clamp: 2; | |
| 76 | + overflow: hidden; | |
| 77 | + white-space: normal; | |
| 78 | + } | |
| 79 | + .pirce { | |
| 80 | + width: 100%; | |
| 81 | + position: absolute; | |
| 82 | + left: 0; | |
| 83 | + bottom: 0; | |
| 84 | + display: flex; | |
| 85 | + justify-content: space-between; | |
| 86 | + .title { | |
| 87 | + span { | |
| 88 | + width: 15px; | |
| 89 | + height: 33px; | |
| 90 | + font-size: 24px; | |
| 91 | + font-weight: 500; | |
| 92 | + color: rgba(208, 2, 27, 1); | |
| 93 | + line-height: 33px; | |
| 94 | + } | |
| 95 | + height: 50px; | |
| 96 | + font-size: 36px; | |
| 97 | + font-weight: 500; | |
| 98 | + color: rgba(208, 2, 27, 1); | |
| 99 | + line-height: 50px; | |
| 100 | + } | |
| 101 | + .btn { | |
| 102 | + width: 146px; | |
| 103 | + height: 52px; | |
| 104 | + line-height: 52px; | |
| 105 | + background: rgba(253, 241, 242, 1); | |
| 106 | + border-radius: 8px; | |
| 107 | + text-align: center; | |
| 108 | + font-size: 26px; | |
| 109 | + color: rgba(208, 2, 27, 1); | |
| 110 | + } | |
| 111 | + } | |
| 112 | + } | |
| 113 | + } | |
| 114 | + .steps_box { | |
| 115 | + margin-top: 58px; | |
| 116 | + .line_box { | |
| 117 | + display: flex; | |
| 118 | + margin: 0 38px; | |
| 119 | + .box { | |
| 120 | + height: 16px; | |
| 121 | + .item { | |
| 122 | + display: flex; | |
| 123 | + .img { | |
| 124 | + width: 16px; | |
| 125 | + height: 16px; | |
| 126 | + background: url("/static/img/spot.png") no-repeat top; | |
| 127 | + background-size: 100%; | |
| 128 | + } | |
| 129 | + .line_box { | |
| 130 | + height: 19px; | |
| 131 | + display: flex; | |
| 132 | + align-items: center; | |
| 133 | + margin: 0 13px; | |
| 134 | + .line { | |
| 135 | + width: 140px; | |
| 136 | + height: 1px; | |
| 137 | + background: rgba(240, 240, 240, 1); | |
| 138 | + } | |
| 139 | + } | |
| 140 | + } | |
| 141 | + } | |
| 142 | + .active { | |
| 143 | + .item { | |
| 144 | + .img { | |
| 145 | + width: 16px; | |
| 146 | + height: 16px; | |
| 147 | + background: url("/static/img/spot_active.png") no-repeat | |
| 148 | + top; | |
| 149 | + background-size: 100%; | |
| 150 | + } | |
| 151 | + } | |
| 152 | + } | |
| 153 | + .active_line { | |
| 154 | + .item { | |
| 155 | + .line_box { | |
| 156 | + .line { | |
| 157 | + background: rgba(208, 2, 27, 1); | |
| 158 | + } | |
| 159 | + } | |
| 160 | + } | |
| 161 | + } | |
| 162 | + } | |
| 163 | + .desc_box { | |
| 164 | + display: flex; | |
| 165 | + justify-content: space-between; | |
| 166 | + margin: 17px auto 0 auto; | |
| 167 | + .desc { | |
| 168 | + height: 30px; | |
| 169 | + font-size: 22px; | |
| 170 | + font-weight: 400; | |
| 171 | + color: rgba(202, 202, 202, 1); | |
| 172 | + line-height: 30px; | |
| 173 | + margin-top: 20px; | |
| 174 | + } | |
| 175 | + .active { | |
| 176 | + color: #666666; | |
| 177 | + } | |
| 178 | + } | |
| 179 | + .box:last-child { | |
| 180 | + .item .line_box { | |
| 181 | + display: none; | |
| 182 | + } | |
| 183 | + } | |
| 184 | + } | |
| 185 | + .text_tip { | |
| 186 | + margin-top: 58px; | |
| 187 | + display: flex; | |
| 188 | + justify-content: flex-end; | |
| 189 | + height: 40px; | |
| 190 | + font-size: 28px; | |
| 191 | + font-weight: 500; | |
| 192 | + color: rgba(51, 51, 51, 1); | |
| 193 | + line-height: 40px; | |
| 194 | + } | |
| 195 | +} | ... | ... |
src/components/receivingGiftsItem/receivingGiftsItem.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <div v-if="receivingGiftsInfo && receivingGiftsInfo.length>0"> | |
| 3 | + <div | |
| 4 | + class="giftItem_box" | |
| 5 | + v-for="(item, index) in receivingGiftsInfo" | |
| 6 | + :key="index" | |
| 7 | + > | |
| 8 | + <!--用户信息--> | |
| 9 | + <div class="user_info"> | |
| 10 | + <img v-lazy="item.user.img" /> | |
| 11 | + <div class="name">{{ item.user.username }}(赠礼)</div> | |
| 12 | + <div @click="giftInReturn(item)" class="btn">回赠礼物</div> | |
| 13 | + <div class="gift_active"></div> | |
| 14 | + </div> | |
| 15 | + <!--商品信息--> | |
| 16 | + <div class="item_info"> | |
| 17 | + <img v-lazy="item.goods.simg" /> | |
| 18 | + <div class="box"> | |
| 19 | + <div class="name">{{ item.goods.title }}</div> | |
| 20 | + <div class="pirce"> | |
| 21 | + <div class="title"> | |
| 22 | + <span>¥</span>{{ item.goods.price }} | |
| 23 | + </div> | |
| 24 | + <div v-if="item.get_gift_state!=7" class="btn"> | |
| 25 | + <span v-if="item.get_gift_state < 3">点击收礼</span> <span v-else-if="item.get_gift_state == 3">填写地址</span> | |
| 26 | + <span v-else-if="item.get_gift_state == 4">商家发货</span> <span v-else-if="item.get_gift_state == 5">确认收货</span> | |
| 27 | + </div> | |
| 28 | + </div> | |
| 29 | + </div> | |
| 30 | + </div> | |
| 31 | + <!--步骤条--> | |
| 32 | + <div class="steps_box" v-if="item.get_gift_state < 6"> | |
| 33 | + <div class="line_box"> | |
| 34 | + <div | |
| 35 | + :class="[ | |
| 36 | + 'box', | |
| 37 | + item.get_gift_state > 2 | |
| 38 | + ? item.get_gift_state > 3 | |
| 39 | + ? 'active active_line' | |
| 40 | + : 'active' | |
| 41 | + : '' | |
| 42 | + ]" | |
| 43 | + > | |
| 44 | + <div class="item"> | |
| 45 | + <div class="img"></div> | |
| 46 | + <div class="line_box"><div class="line"></div></div> | |
| 47 | + </div> | |
| 48 | + </div> | |
| 49 | + <div | |
| 50 | + :class="[ | |
| 51 | + 'box', | |
| 52 | + item.get_gift_state > 3 | |
| 53 | + ? item.get_gift_state > 4 | |
| 54 | + ? 'active active_line' | |
| 55 | + : 'active' | |
| 56 | + : '' | |
| 57 | + ]" | |
| 58 | + > | |
| 59 | + <div class="item"> | |
| 60 | + <div class="img"></div> | |
| 61 | + <div class="line_box"><div class="line"></div></div> | |
| 62 | + </div> | |
| 63 | + </div> | |
| 64 | + <div | |
| 65 | + :class="[ | |
| 66 | + 'box', | |
| 67 | + item.get_gift_state > 4 | |
| 68 | + ? item.get_gift_state > 5 | |
| 69 | + ? 'active active_line' | |
| 70 | + : 'active' | |
| 71 | + : '' | |
| 72 | + ]" | |
| 73 | + > | |
| 74 | + <div class="item"> | |
| 75 | + <div class="img"></div> | |
| 76 | + <div class="line_box"><div class="line"></div></div> | |
| 77 | + </div> | |
| 78 | + </div> | |
| 79 | + <div | |
| 80 | + :class="[ | |
| 81 | + 'box', | |
| 82 | + item.get_gift_state > 5 | |
| 83 | + ? item.get_gift_state > 6 | |
| 84 | + ? 'active active_line' | |
| 85 | + : 'active' | |
| 86 | + : '' | |
| 87 | + ]" | |
| 88 | + > | |
| 89 | + <div class="item"> | |
| 90 | + <div class="img"></div> | |
| 91 | + <div class="line_box"><div class="line"></div></div> | |
| 92 | + </div> | |
| 93 | + </div> | |
| 94 | + </div> | |
| 95 | + <div class="desc_box"> | |
| 96 | + <div | |
| 97 | + class="desc" | |
| 98 | + :class="{ active: item.get_gift_state > 2 }" | |
| 99 | + > | |
| 100 | + 点击收礼 | |
| 101 | + </div> | |
| 102 | + <div | |
| 103 | + class="desc" | |
| 104 | + :class="{ active: item.get_gift_state > 3 }" | |
| 105 | + > | |
| 106 | + 填写地址 | |
| 107 | + </div> | |
| 108 | + <div | |
| 109 | + class="desc" | |
| 110 | + :class="{ active: item.get_gift_state > 4 }" | |
| 111 | + > | |
| 112 | + 商家发货 | |
| 113 | + </div> | |
| 114 | + <div | |
| 115 | + class="desc" | |
| 116 | + :class="{ active: item.get_gift_state > 5 }" | |
| 117 | + > | |
| 118 | + 确认收货 | |
| 119 | + </div> | |
| 120 | + </div> | |
| 121 | + </div> | |
| 122 | + <!-- 显示文字 --> | |
| 123 | + <div class="text_tip" v-else> | |
| 124 | + 完成 | |
| 125 | + </div> | |
| 126 | + </div> | |
| 127 | + </div> | |
| 128 | +</template> | |
| 129 | + | |
| 130 | +<script> | |
| 131 | +export default { | |
| 132 | + name: "name", | |
| 133 | + data() { | |
| 134 | + return {}; | |
| 135 | + }, | |
| 136 | + props: ["receivingGiftsInfo"], | |
| 137 | + created() {}, | |
| 138 | + methods: { | |
| 139 | + giftInReturn(item){ | |
| 140 | + this.$emit('giftInReturn',item) | |
| 141 | + } | |
| 142 | + } | |
| 143 | +}; | |
| 144 | +</script> | |
| 145 | + | |
| 146 | +<!-- Add "scoped" attribute to limit CSS to this component only --> | |
| 147 | +<style rel="stylesheet/less" lang="less" scoped> | |
| 148 | +@import "receivingGiftsItem"; | |
| 149 | +</style> | ... | ... |
src/components/shopDarenHot/shopDarenHot.less
0 → 100644
| 1 | +.recommendDaren{ | |
| 2 | + padding-left: 30px; | |
| 3 | + display: flex; | |
| 4 | + margin-top: 30px; | |
| 5 | + .daren_box{ | |
| 6 | + width:210px; | |
| 7 | + height:auto; | |
| 8 | + background:rgba(255,255,255,1); | |
| 9 | + box-shadow:0px 0px 12px 0px rgba(0,0,0,0.06); | |
| 10 | + border-radius:12px; | |
| 11 | + text-align: center; | |
| 12 | + padding: 30px 0; | |
| 13 | + margin-left: 30px; | |
| 14 | + .head_portrait{ | |
| 15 | + width: 100px; | |
| 16 | + height: 100px; | |
| 17 | + border-radius: 100px; | |
| 18 | + margin: 0 auto 7px auto; | |
| 19 | + } | |
| 20 | + .name{ | |
| 21 | + height:40px; | |
| 22 | + line-height: 40px; | |
| 23 | + font-size:28px; | |
| 24 | + font-weight:500; | |
| 25 | + color:rgba(51,51,51,1); | |
| 26 | + } | |
| 27 | + .desc{ | |
| 28 | + height:25px; | |
| 29 | + font-size:18px; | |
| 30 | + font-weight:400; | |
| 31 | + color:rgba(153,153,153,1); | |
| 32 | + line-height:25px; | |
| 33 | + overflow: hidden; | |
| 34 | + } | |
| 35 | + .btn{ | |
| 36 | + width:120px; | |
| 37 | + height:48px; | |
| 38 | + border-radius:26px; | |
| 39 | + border:1px solid rgba(252,21,65,1); | |
| 40 | + color: #FC1541; | |
| 41 | + font-size: 26px; | |
| 42 | + line-height: 48px; | |
| 43 | + margin: 25px auto 0 auto; | |
| 44 | + } | |
| 45 | + } | |
| 46 | + .daren_box:nth-child(1){ | |
| 47 | + margin-left: 0px; | |
| 48 | + } | |
| 49 | +} | ... | ... |
src/components/shopDarenHot/shopDarenHot.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <div v-if="item" class="recommendDaren" @click="userJump(item)"> | |
| 3 | + <div class="daren_box"> | |
| 4 | + <img class="head_portrait" v-lazy="item.logo" /> | |
| 5 | + <div class="name"> | |
| 6 | + {{item.title}} | |
| 7 | + </div> | |
| 8 | + <div class="desc"> | |
| 9 | + {{item.titles}} | |
| 10 | + </div> | |
| 11 | + <div v-if="item.is_fans==0" @click.stop.prevent @click="fansShop(item)" class="btn"> | |
| 12 | + 关注 | |
| 13 | + </div> | |
| 14 | + <div v-else @click.stop.prevent @click="fansShop(item)" class="btn"> | |
| 15 | + 已关注 | |
| 16 | + </div> | |
| 17 | + </div> | |
| 18 | + </div> | |
| 19 | +</template> | |
| 20 | + | |
| 21 | +<script> | |
| 22 | + export default { | |
| 23 | + name: 'recommendDaren', | |
| 24 | + data () { | |
| 25 | + return { | |
| 26 | + | |
| 27 | + } | |
| 28 | + }, | |
| 29 | + props:["item"], | |
| 30 | + created(){ | |
| 31 | + console.log(this.item) | |
| 32 | + }, | |
| 33 | + methods: { | |
| 34 | + /** | |
| 35 | + * 点击跳转 | |
| 36 | + * @param {object} item [数据对象] | |
| 37 | + */ | |
| 38 | + userJump(item) { | |
| 39 | + this.$emit("userJump", item); | |
| 40 | + }, | |
| 41 | + /** | |
| 42 | + * 关注达人 | |
| 43 | + * @param {object} item [数据对象] | |
| 44 | + */ | |
| 45 | + fansShop(item) { | |
| 46 | + this.$emit("fansShop", item); | |
| 47 | + }, | |
| 48 | + } | |
| 49 | + } | |
| 50 | +</script> | |
| 51 | + | |
| 52 | +<!-- Add "scoped" attribute to limit CSS to this component only --> | |
| 53 | +<style rel="stylesheet/less" lang="less" scoped> | |
| 54 | + @import "shopDarenHot"; | |
| 55 | +</style> | ... | ... |
src/components/shopDatenTop/shopDatenTop.less
0 → 100644
| 1 | +.item_box{ | |
| 2 | + margin: 30px; | |
| 3 | + padding-bottom: 30px; | |
| 4 | + display: flex; | |
| 5 | + align-items: center; | |
| 6 | + .head_portrait{ | |
| 7 | + width: 100px; | |
| 8 | + height: 100px; | |
| 9 | + border-radius: 100px; | |
| 10 | + } | |
| 11 | + .user_info{ | |
| 12 | + margin-left: 30px; | |
| 13 | + text-align: left; | |
| 14 | + flex: 1; | |
| 15 | + .daren_box{ | |
| 16 | + display: flex; | |
| 17 | + height: 40px; | |
| 18 | + align-items: center; | |
| 19 | + .name{ | |
| 20 | + height:40px; | |
| 21 | + font-size:28px; | |
| 22 | + font-weight:500; | |
| 23 | + color:rgba(51,51,51,1); | |
| 24 | + line-height:40px; | |
| 25 | + -webkit-line-clamp: 1; | |
| 26 | + /*! autoprefixer: off */ | |
| 27 | + -webkit-box-orient: vertical; | |
| 28 | + /*! autoprefixer: on */ | |
| 29 | + text-overflow: ellipsis; | |
| 30 | + overflow: hidden; | |
| 31 | + } | |
| 32 | + .tag{ | |
| 33 | + //height: 28px; | |
| 34 | + //line-height: 28px; | |
| 35 | + padding:0 8px; | |
| 36 | + border-radius:6px; | |
| 37 | + border:1px solid rgba(245,166,35,1); | |
| 38 | + font-size:20px; | |
| 39 | + color:rgba(245,166,35,1); | |
| 40 | + margin-left: 10px; | |
| 41 | + } | |
| 42 | + } | |
| 43 | + .desc{ | |
| 44 | + height:33px; | |
| 45 | + font-size:24px; | |
| 46 | + font-weight:400; | |
| 47 | + color:rgba(102,102,102,1); | |
| 48 | + line-height:33px; | |
| 49 | + margin-top: 10px; | |
| 50 | + } | |
| 51 | + } | |
| 52 | + .btn{ | |
| 53 | + width:120px; | |
| 54 | + height:48px; | |
| 55 | + background:rgba(255,236,239,1); | |
| 56 | + border-radius:26px; | |
| 57 | + color: #FC1541; | |
| 58 | + font-size: 26px; | |
| 59 | + text-align: center; | |
| 60 | + line-height: 48px; | |
| 61 | + } | |
| 62 | +} | ... | ... |
src/components/shopDatenTop/shopDatenTop.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <div> | |
| 3 | + <div class="item_box" @click="userJump(shopDatenTop)"> | |
| 4 | + <img class="head_portrait" v-lazy="shopDatenTop.logo" /> | |
| 5 | + <div class="user_info"> | |
| 6 | + <div class="daren_box"> | |
| 7 | + <div class="name"> | |
| 8 | + {{shopDatenTop.title}} | |
| 9 | + </div> | |
| 10 | + <div class="tag"> | |
| 11 | + 人气 | |
| 12 | + </div> | |
| 13 | + </div> | |
| 14 | + <div class="desc"> | |
| 15 | + {{shopDatenTop.titles}} | |
| 16 | + </div> | |
| 17 | + </div> | |
| 18 | + <div class="btn"> | |
| 19 | + 查看 | |
| 20 | + </div> | |
| 21 | + </div> | |
| 22 | + </div> | |
| 23 | +</template> | |
| 24 | + | |
| 25 | +<script> | |
| 26 | + export default { | |
| 27 | + name: 'darenInfo', | |
| 28 | + data() { | |
| 29 | + return { | |
| 30 | + | |
| 31 | + } | |
| 32 | + }, | |
| 33 | + props: ["shopDatenTop"], | |
| 34 | + methods: { | |
| 35 | + | |
| 36 | + /** | |
| 37 | + * 点击事件 | |
| 38 | + * @param {object} item [数据参数] | |
| 39 | + */ | |
| 40 | + userJump(item) { | |
| 41 | + this.$emit("userJump", item); | |
| 42 | + } | |
| 43 | + } | |
| 44 | + } | |
| 45 | +</script> | |
| 46 | + | |
| 47 | +<!-- Add "scoped" attribute to limit CSS to this component only --> | |
| 48 | +<style rel="stylesheet/less" lang="less" scoped> | |
| 49 | + @import "shopDatenTop"; | |
| 50 | +</style> | ... | ... |
src/components/userAvatarBox/userAvatarBox.less
0 → 100644
| 1 | +@charset "UTF-8"; | |
| 2 | + | |
| 3 | +.user-avatar-box { | |
| 4 | + display: inline-block; | |
| 5 | + background-color: transparent; | |
| 6 | + width: 100%; | |
| 7 | + height: auto; | |
| 8 | + .box { | |
| 9 | + position: relative; | |
| 10 | + display: flex; | |
| 11 | + justify-content: flex-start; | |
| 12 | + align-items: center; | |
| 13 | + width: auto; | |
| 14 | + height: 100%; | |
| 15 | + .avatar-box { | |
| 16 | + width: 100px; | |
| 17 | + height: 100px; | |
| 18 | + .avatar-img { | |
| 19 | + display: block; | |
| 20 | + width: 100px; | |
| 21 | + height: 100px; | |
| 22 | + img{ | |
| 23 | + border-radius: 100px; | |
| 24 | + } | |
| 25 | + } | |
| 26 | + } | |
| 27 | + .nickname { | |
| 28 | + margin-left: 20px; | |
| 29 | + color: #333333; | |
| 30 | + font-size: 28px; | |
| 31 | + } | |
| 32 | + } | |
| 33 | +} | ... | ... |
src/components/userAvatarBox/userAvatarBox.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <div class="user-avatar-box" v-if="users" @click="jump(users)"> | |
| 3 | + <div class="box"> | |
| 4 | + <div class="avatar-box"> | |
| 5 | + <van-image | |
| 6 | + class="avatar-img" | |
| 7 | + fit="cover" | |
| 8 | + lazy-load | |
| 9 | + :src="users.logo || item" | |
| 10 | + /> | |
| 11 | + </div> | |
| 12 | + <div class="nickname"> | |
| 13 | + {{users.title}} | |
| 14 | + </div> | |
| 15 | + </div> | |
| 16 | + </div> | |
| 17 | +</template> | |
| 18 | + | |
| 19 | +<script> | |
| 20 | + export default { | |
| 21 | + name: "userAvatar", | |
| 22 | + data: function () { | |
| 23 | + return { | |
| 24 | + | |
| 25 | + } | |
| 26 | + }, | |
| 27 | + props: ["users"], | |
| 28 | + methods: { | |
| 29 | + | |
| 30 | + /** | |
| 31 | + * 点击跳转事件绑定 | |
| 32 | + */ | |
| 33 | + jump(item) { | |
| 34 | + this.$emit("jump", item); | |
| 35 | + } | |
| 36 | + } | |
| 37 | + } | |
| 38 | +</script> | |
| 39 | + | |
| 40 | +<!-- Add "scoped" attribute to limit CSS to this component only --> | |
| 41 | +<style rel="stylesheet/less" lang="less"> | |
| 42 | + @import './userAvatarBox'; | |
| 43 | +</style> | ... | ... |
src/main.js
| ... | ... | @@ -6,7 +6,7 @@ import VueHead from "vue-head"; |
| 6 | 6 | import sha1 from "sha1"; |
| 7 | 7 | import 'mint-ui/lib/style.css'; |
| 8 | 8 | import { Toast, Indicator,InfiniteScroll } from "mint-ui"; |
| 9 | -import { Rate, Popup, Lazyload, Search, PullRefresh, Picker, Tab, Tabs} from "vant"; | |
| 9 | +import { Rate, Popup, Lazyload, Search, PullRefresh, Picker } from "vant"; | |
| 10 | 10 | import App from "./App"; |
| 11 | 11 | import IdCard from './common/IdCard'; |
| 12 | 12 | import VueBus from 'vue-bus'; |
| ... | ... | @@ -18,6 +18,9 @@ Vue.use(Rate); |
| 18 | 18 | Vue.use(Popup); |
| 19 | 19 | Vue.use(PullRefresh); |
| 20 | 20 | Vue.use(Picker); |
| 21 | +Vue.use(Image); | |
| 22 | +Vue.use(ImagePreview); | |
| 23 | +Vue.use(VueClipboard) | |
| 21 | 24 | Vue.use(Tab); |
| 22 | 25 | Vue.use(Tabs); |
| 23 | 26 | Vue.use(Lazyload, { |
| ... | ... | @@ -46,7 +49,7 @@ import 'url-search-params-polyfill'; |
| 46 | 49 | Vue.config.productionTip = false; |
| 47 | 50 | |
| 48 | 51 | // 部署模式设置(开发模式:"dev",测试模式:"test",生产模式:"prod") |
| 49 | -Vue.prototype.mode = "test"; | |
| 52 | +Vue.prototype.mode = "dev"; | |
| 50 | 53 | |
| 51 | 54 | // 微信JS-SDK对象 |
| 52 | 55 | Vue.prototype.jweixin = { | ... | ... |
src/pages/common/common.vue
| ... | ... | @@ -556,18 +556,18 @@ |
| 556 | 556 | |
| 557 | 557 | |
| 558 | 558 | break; |
| 559 | - case "24": // 跳转达人详情页,跟参数from=redirect | |
| 559 | + case "24": // 跳转达人个人主页连接,跟参数from=redirect | |
| 560 | 560 | |
| 561 | - // 达人详情页连接 | |
| 561 | + // 达人个人主页连接 | |
| 562 | 562 | if (item.to) { |
| 563 | 563 | window.location.href = (this.mode == "prod") ? "https://managemall.cnlive.com/html/preferred-library/1/#/pages/darenProfile/darenProfile?id=" + item.to + "&from=redirect" : "https://wjjshop.cnlive.com/html/preferred-library/1/#/pages/darenProfile/darenProfile?id=" + item.to + "&from=redirect"; |
| 564 | 564 | } |
| 565 | 565 | break; |
| 566 | - case "25": // 跳转达人详情页,跟参数from=redirect | |
| 566 | + case "25": // 跳转达人动态详情页连接,跟参数from=redirect | |
| 567 | 567 | |
| 568 | - // 达人详情页连接 | |
| 569 | - if (item.id) { | |
| 570 | - window.location.href = (this.mode == "prod") ? "https://managemall.cnlive.com/html/preferred-library/1/#/pages/darenProfileDynamicDetail/darenProfileDynamicDetail?id=" + item.id + "&from=redirect" : "https://wjjshop.cnlive.com/html/preferred-library/1/#/pages/darenProfileDynamicDetail/darenProfileDynamicDetail?id=" + item.id + "&from=redirect"; | |
| 568 | + // 达人动态详情页连接 | |
| 569 | + if (item.id || item.to) { | |
| 570 | + window.location.href = (this.mode == "prod") ? "https://managemall.cnlive.com/html/preferred-library/1/#/pages/darenProfileDynamicDetail/darenProfileDynamicDetail?id=" + (item.id || item.to) + "&from=redirect" : "https://wjjshop.cnlive.com/html/preferred-library/1/#/pages/darenProfileDynamicDetail/darenProfileDynamicDetail?id=" + (item.id || item.to) + "&from=redirect"; | |
| 571 | 571 | } |
| 572 | 572 | break; |
| 573 | 573 | } | ... | ... |
src/pages/darenList/darenList.less
0 → 100644
src/pages/darenList/darenList.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <div class="daren-list"> | |
| 3 | + | |
| 4 | + <!-- 达人动态列表 --> | |
| 5 | + <daren-list-box class="daren-list" @userJump="userJump" @jump="jump" @goodsJump="goodsJump" @goodsPrimary="goodsPrimary" | |
| 6 | + :lists="[ | |
| 7 | + { | |
| 8 | + user: { | |
| 9 | + simg: 'static/img/6.png', | |
| 10 | + nickname: '欧阳娜娜' | |
| 11 | + }, | |
| 12 | + createtime: '123分钟前', | |
| 13 | + intro: '盆地是地球表面(岩石圈表面)相对长时期沉降的区域,因整个地形外观与盆子相似而得名。换言之盆地是基底表面相对于海拔盆地是地球表面相对长时期沉降的区域盆地是地球表面(岩石圈表面)相对长时期沉降的区域,因整个地形外观与盆子相似而得名。换言之盆地是基底表面相对于海拔盆地是地球表面相对长时期沉降的区域盆地是地球表面(岩石圈表面)相对长时期沉降的区域,因整个地形外观与盆子相似而得名。换言之盆地是基底表面相对于海拔盆地是地球表面相对长时期沉降的区域盆地是地球表面(岩石圈表面)相对长时期沉降的区域,因整个地形外观与盆子相似而得名。换言之盆地是基底表面相对于海拔盆地是地球表面相对长时期沉降的区域', | |
| 14 | + img: { | |
| 15 | + list: [ | |
| 16 | + { | |
| 17 | + img: 'static/img/banner-02.jpg' | |
| 18 | + } | |
| 19 | + ] | |
| 20 | + }, | |
| 21 | + hot: { | |
| 22 | + simg: 'static/img/icon_popular_comment.png', | |
| 23 | + info: '口红很赞的哦,颜色很漂亮的显得肤色特别白嫩~口红很赞的哦,颜色很漂亮的显得肤色特别白嫩~口红很赞的哦,颜色很漂亮的显得肤色特别白嫩~' | |
| 24 | + }, | |
| 25 | + goods: [ | |
| 26 | + { | |
| 27 | + simg: 'static/img/pic_3.jpg', | |
| 28 | + title: '臻溪国奖茯全金花黑茶', | |
| 29 | + price: '288.00' | |
| 30 | + } | |
| 31 | + ], | |
| 32 | + comment_num: '11100', | |
| 33 | + like_num: '123' | |
| 34 | + }, | |
| 35 | + { | |
| 36 | + user: { | |
| 37 | + simg: 'static/img/6.png', | |
| 38 | + nickname: '欧阳娜娜' | |
| 39 | + }, | |
| 40 | + createtime: '123分钟前', | |
| 41 | + img: { | |
| 42 | + list: [ | |
| 43 | + { | |
| 44 | + img: 'static/img/banner-03.jpg' | |
| 45 | + } | |
| 46 | + ] | |
| 47 | + }, | |
| 48 | + hot: { | |
| 49 | + simg: 'static/img/icon_popular_comment.png', | |
| 50 | + info: '口红很赞的哦,颜色很漂亮的显得肤色特别白嫩~口红很赞的哦,颜色很漂亮的显得肤色特别白嫩~口红很赞的哦,颜色很漂亮的显得肤色特别白嫩~' | |
| 51 | + }, | |
| 52 | + goods: [ | |
| 53 | + { | |
| 54 | + simg: 'static/img/pic_3.jpg', | |
| 55 | + title: '臻溪国奖茯全金花黑茶', | |
| 56 | + price: '288.00' | |
| 57 | + } | |
| 58 | + ], | |
| 59 | + comment_num: '11100', | |
| 60 | + like_num: '123' | |
| 61 | + }, | |
| 62 | + { | |
| 63 | + user: { | |
| 64 | + simg: 'static/img/6.png', | |
| 65 | + nickname: '欧阳娜娜' | |
| 66 | + }, | |
| 67 | + createtime: '123分钟前', | |
| 68 | + intro: '盆地是地球表面(岩石圈表面)相对长时期沉降的区域,因整个地形外观与盆子相似而得名。换言之盆地是基底表面相对于海拔盆地是地球表面相对长时期沉降的区域盆地是地球表面(岩石圈表面)相对长时期沉降的区域,因整个地形外观与盆子相似而得名。换言之盆地是基底表面相对于海拔盆地是地球表面相对长时期沉降的区域盆地是地球表面(岩石圈表面)相对长时期沉降的区域,因整个地形外观与盆子相似而得名。换言之盆地是基底表面相对于海拔盆地是地球表面相对长时期沉降的区域盆地是地球表面(岩石圈表面)相对长时期沉降的区域,因整个地形外观与盆子相似而得名。换言之盆地是基底表面相对于海拔盆地是地球表面相对长时期沉降的区域', | |
| 69 | + hot: { | |
| 70 | + simg: 'static/img/icon_popular_comment.png', | |
| 71 | + info: '口红很赞的哦,颜色很漂亮的显得肤色特别白嫩~口红很赞的哦,颜色很漂亮的显得肤色特别白嫩~口红很赞的哦,颜色很漂亮的显得肤色特别白嫩~' | |
| 72 | + }, | |
| 73 | + goods: [ | |
| 74 | + { | |
| 75 | + simg: 'static/img/pic_3.jpg', | |
| 76 | + title: '臻溪国奖茯全金花黑茶', | |
| 77 | + price: '288.00' | |
| 78 | + }, | |
| 79 | + { | |
| 80 | + simg: 'static/img/pic_2.jpg', | |
| 81 | + title: '臻溪国奖茯全金花黑茶', | |
| 82 | + price: '288.00' | |
| 83 | + }, | |
| 84 | + { | |
| 85 | + simg: 'static/img/pic_1.jpg', | |
| 86 | + title: '臻溪国奖茯全金花黑茶', | |
| 87 | + price: '288.00' | |
| 88 | + }, | |
| 89 | + { | |
| 90 | + simg: 'static/img/pic_3.jpg', | |
| 91 | + title: '臻溪国奖茯全金花黑茶', | |
| 92 | + price: '288.00' | |
| 93 | + }, | |
| 94 | + { | |
| 95 | + simg: 'static/img/pic_2.jpg', | |
| 96 | + title: '臻溪国奖茯全金花黑茶', | |
| 97 | + price: '288.00' | |
| 98 | + }, | |
| 99 | + { | |
| 100 | + simg: 'static/img/pic_1.jpg', | |
| 101 | + title: '臻溪国奖茯全金花黑茶', | |
| 102 | + price: '288.00' | |
| 103 | + } | |
| 104 | + ], | |
| 105 | + comment_num: '11100', | |
| 106 | + like_num: '123' | |
| 107 | + }, | |
| 108 | + { | |
| 109 | + user: { | |
| 110 | + simg: 'static/img/6.png', | |
| 111 | + nickname: '欧阳娜娜' | |
| 112 | + }, | |
| 113 | + createtime: '123分钟前', | |
| 114 | + intro: '盆地是地球表面(岩石圈表面)相对长时期沉降的区域,因整个地形外观与盆子相似而得名。换言之盆地是基底表面相对于海拔盆地是地球表面相对长时期沉降的区域盆地是地球表面(岩石圈表面)相对长时期沉降的区域,因整个地形外观与盆子相似而得名。换言之盆地是基底表面相对于海拔盆地是地球表面相对长时期沉降的区域盆地是地球表面(岩石圈表面)相对长时期沉降的区域,因整个地形外观与盆子相似而得名。换言之盆地是基底表面相对于海拔盆地是地球表面相对长时期沉降的区域盆地是地球表面(岩石圈表面)相对长时期沉降的区域,因整个地形外观与盆子相似而得名。换言之盆地是基底表面相对于海拔盆地是地球表面相对长时期沉降的区域', | |
| 115 | + img: { | |
| 116 | + list: [ | |
| 117 | + { | |
| 118 | + img: 'static/img/banner-02.jpg' | |
| 119 | + } | |
| 120 | + ] | |
| 121 | + }, | |
| 122 | + goods: [ | |
| 123 | + { | |
| 124 | + simg: 'static/img/pic_3.jpg', | |
| 125 | + title: '臻溪国奖茯全金花黑茶', | |
| 126 | + price: '288.00' | |
| 127 | + }, | |
| 128 | + { | |
| 129 | + simg: 'static/img/pic_1.jpg', | |
| 130 | + title: '臻溪国奖茯全金花黑茶', | |
| 131 | + price: '288.00' | |
| 132 | + } | |
| 133 | + ], | |
| 134 | + comment_num: '11100', | |
| 135 | + like_num: '123' | |
| 136 | + } | |
| 137 | + ]"> | |
| 138 | + | |
| 139 | + <!-- 最新动态标题 --> | |
| 140 | + <text-title-box slot="title-box" @more="newDarenDynamicsMore" | |
| 141 | + :titles="{ | |
| 142 | + title: '最新动态', | |
| 143 | + more: true | |
| 144 | + }"> | |
| 145 | + </text-title-box> | |
| 146 | + </daren-list-box> | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + </div> | |
| 160 | +</template> | |
| 161 | + | |
| 162 | +<script> | |
| 163 | + | |
| 164 | + // 引入组件 | |
| 165 | + import { Toast, Indicator } from "mint-ui"; | |
| 166 | + import darenListBox from "@/components/darenListBox/darenListBox"; | |
| 167 | + import textTitleBox from "@/components/textTitleBox/textTitleBox"; | |
| 168 | + | |
| 169 | + export default { | |
| 170 | + name: "darenList", | |
| 171 | + data() { | |
| 172 | + return { | |
| 173 | + title: "", // 标题 | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + } | |
| 179 | + }, | |
| 180 | + components:{ | |
| 181 | + darenListBox, | |
| 182 | + textTitleBox | |
| 183 | + }, | |
| 184 | + created() { | |
| 185 | + | |
| 186 | + // 设置标题 | |
| 187 | + this.$set(this, "title", "达人"); | |
| 188 | + | |
| 189 | + // 获取优选库精选活动 | |
| 190 | + // this.activityAd(); | |
| 191 | + }, | |
| 192 | + methods: { | |
| 193 | + | |
| 194 | + // 下拉刷新 | |
| 195 | + // onRefresh() { | |
| 196 | + | |
| 197 | + // // 下拉刷新中 | |
| 198 | + // this.$set(this, "isLoading", true); | |
| 199 | + | |
| 200 | + // // 获取优选库精选活动 | |
| 201 | + // this.activityAd(); | |
| 202 | + // }, | |
| 203 | + | |
| 204 | + /** | |
| 205 | + * 获取优选库精选活动 | |
| 206 | + */ | |
| 207 | + activityAd() { | |
| 208 | + // 加载中提示 | |
| 209 | + Indicator.open("加载中..."); | |
| 210 | + | |
| 211 | + // 获取证书请求接口 | |
| 212 | + this.http("/Api/" + this.getApiVersion().index + "/activityAd", { | |
| 213 | + id: this.$route.query.id | |
| 214 | + }, this.activityAdCallback, { | |
| 215 | + method: "post" | |
| 216 | + } | |
| 217 | + ); | |
| 218 | + }, | |
| 219 | + | |
| 220 | + /** | |
| 221 | + * 获取优选库精选活动回调 | |
| 222 | + * @param {object} res [服务器返回数据] | |
| 223 | + * @param {object} ext [扩展参数] | |
| 224 | + */ | |
| 225 | + activityAdCallback(res, ext) { | |
| 226 | + | |
| 227 | + // 加载完成 | |
| 228 | + Indicator.close(); | |
| 229 | + | |
| 230 | + // 下拉刷新结束 | |
| 231 | + this.$set(this, "isLoading", false); | |
| 232 | + | |
| 233 | + // 返回处理 | |
| 234 | + if (res.code == 200) { | |
| 235 | + | |
| 236 | + // 解构数据 | |
| 237 | + let { data: datas } = res; | |
| 238 | + | |
| 239 | + /* 获取优选库精选活动数据 开始 */ | |
| 240 | + | |
| 241 | + // 设置标题 | |
| 242 | + this.$set(this, "title", datas.title); | |
| 243 | + | |
| 244 | + // 设置banner数据 | |
| 245 | + if (datas.banner && datas.banner.length) { | |
| 246 | + this.$set(this, "banner", datas.banner); | |
| 247 | + } | |
| 248 | + | |
| 249 | + // 设置navs数据 | |
| 250 | + if (datas.navs && datas.navs.length) { | |
| 251 | + this.$set(this, "navs", datas.navs); | |
| 252 | + } | |
| 253 | + | |
| 254 | + // 设置ads数据 | |
| 255 | + if (datas.ads && datas.ads.length) { | |
| 256 | + this.$set(this, "ads", datas.ads); | |
| 257 | + } | |
| 258 | + | |
| 259 | + /* 获取优选库精选活动数据 结束 */ | |
| 260 | + | |
| 261 | + } else if (res.code == 400) { | |
| 262 | + | |
| 263 | + // 获取优选库精选活动失败 | |
| 264 | + Toast(res.message); | |
| 265 | + } else { | |
| 266 | + | |
| 267 | + // 获取优选库精选活动失败 | |
| 268 | + Toast("获取优选库精选活动失败"); | |
| 269 | + } | |
| 270 | + }, | |
| 271 | + | |
| 272 | + /** | |
| 273 | + * 调用通用跳转 | |
| 274 | + * @param {object} item [通用跳转对象] | |
| 275 | + */ | |
| 276 | + toDetail(item) { | |
| 277 | + | |
| 278 | + // 判断是否有通用跳转函数 | |
| 279 | + if (typeof this.$parent.gotoDetail === "function") { | |
| 280 | + | |
| 281 | + // 调用通用跳转 | |
| 282 | + this.$parent.gotoDetail(item); | |
| 283 | + } | |
| 284 | + }, | |
| 285 | + | |
| 286 | + /** | |
| 287 | + * 最新达人动态更过 | |
| 288 | + */ | |
| 289 | + newDarenDynamicsMore() { | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + console.log("newDarenDynamicsMore"); | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + }, | |
| 298 | + | |
| 299 | + /** | |
| 300 | + * 跳转达人动态详情 | |
| 301 | + * @param {object} item [数据对象] | |
| 302 | + */ | |
| 303 | + jump(item) { | |
| 304 | + | |
| 305 | + // 判断并调用通用跳转 | |
| 306 | + if (typeof this.$parent.gotoDetail === "function") { | |
| 307 | + | |
| 308 | + | |
| 309 | + // 临时,设置跳转参数,跳转达人动态详情页面 | |
| 310 | + Object.assign(item, { | |
| 311 | + type: "25", | |
| 312 | + to: "265", | |
| 313 | + shop_type: "" | |
| 314 | + }); | |
| 315 | + | |
| 316 | + | |
| 317 | + console.log("jump", item); | |
| 318 | + | |
| 319 | + | |
| 320 | + this.$parent.gotoDetail(item); | |
| 321 | + } | |
| 322 | + }, | |
| 323 | + | |
| 324 | + /** | |
| 325 | + * 用户头像/昵称,点击跳转 | |
| 326 | + * @param {object} item [数据对象] | |
| 327 | + */ | |
| 328 | + userJump(item) { | |
| 329 | + | |
| 330 | + // 判断并调用通用跳转 | |
| 331 | + if (typeof this.$parent.gotoDetail === "function") { | |
| 332 | + | |
| 333 | + // 临时,设置跳转达人个人主页用户数据 | |
| 334 | + Object.assign(item, { | |
| 335 | + type: "5", | |
| 336 | + to: (this.mode == "prod") ? "https://managemall.cnlive.com/html/preferred-library/1/#/pages/darenProfile/darenProfile?id=40&from=redirect" : "https://wjjshop.cnlive.com/html/preferred-library/1/#/pages/darenProfile/darenProfile?id=40&from=redirect", | |
| 337 | + shop_type: "" | |
| 338 | + }); | |
| 339 | + | |
| 340 | + | |
| 341 | + console.log("userJump", item); | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + this.$parent.gotoDetail(item); | |
| 347 | + } | |
| 348 | + }, | |
| 349 | + | |
| 350 | + /** | |
| 351 | + * 点击跳转商品 | |
| 352 | + * @param {object} item [数据对象] | |
| 353 | + */ | |
| 354 | + goodsJump(item) { | |
| 355 | + | |
| 356 | + // 判断并调用通用跳转 | |
| 357 | + if (typeof this.$parent.gotoDetail === "function") { | |
| 358 | + | |
| 359 | + // 临时,设置跳转商品详情参数 | |
| 360 | + Object.assign(item, { | |
| 361 | + type: "2", | |
| 362 | + to: "9525393", | |
| 363 | + shop_type: "1" | |
| 364 | + }); | |
| 365 | + | |
| 366 | + | |
| 367 | + console.log("goodsJump", item); | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + this.$parent.gotoDetail(item); | |
| 372 | + } | |
| 373 | + }, | |
| 374 | + | |
| 375 | + /** | |
| 376 | + * 点击跳转商品购买 | |
| 377 | + * @param {object} item [数据对象] | |
| 378 | + */ | |
| 379 | + goodsPrimary(item) { | |
| 380 | + | |
| 381 | + // 判断并调用通用跳转 | |
| 382 | + if (typeof this.$parent.gotoDetail === "function") { | |
| 383 | + | |
| 384 | + // 临时,设置跳转商品详情参数 | |
| 385 | + Object.assign(item, { | |
| 386 | + type: "2", | |
| 387 | + to: "9525393", | |
| 388 | + shop_type: "1" | |
| 389 | + }); | |
| 390 | + | |
| 391 | + | |
| 392 | + console.log("goodsPrimary", item); | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + this.$parent.gotoDetail(item); | |
| 397 | + } | |
| 398 | + } | |
| 399 | + }, | |
| 400 | + head: { | |
| 401 | + title () { | |
| 402 | + return { | |
| 403 | + inner: this.title | |
| 404 | + } | |
| 405 | + } | |
| 406 | + }, | |
| 407 | + watch: { | |
| 408 | + | |
| 409 | + // 设置页面标题 | |
| 410 | + title(newVal) { | |
| 411 | + if (this.$store.state.browser.toLowerCase() == "qq" && this.$store.state.deviceType.toLowerCase() == "iphone") { | |
| 412 | + this.$iFrame.insertIFrame(newVal); | |
| 413 | + } else { | |
| 414 | + this.$emit("updateHead"); | |
| 415 | + } | |
| 416 | + } | |
| 417 | + } | |
| 418 | + } | |
| 419 | +</script> | |
| 420 | + | |
| 421 | +<!-- Add "scoped" attribute to limit CSS to this component only --> | |
| 422 | +<style rel="stylesheet/less" lang="less" scoped> | |
| 423 | + @import "darenList"; | |
| 424 | +</style> | ... | ... |
src/pages/fansShopMessageList/fansShopMessageList.vue
| ... | ... | @@ -11,18 +11,15 @@ |
| 11 | 11 | |
| 12 | 12 | <!-- 已关注达人列表 --> |
| 13 | 13 | <div class="item_box"> |
| 14 | - <ul | |
| 14 | + <div | |
| 15 | 15 | v-infinite-scroll="loadMore" |
| 16 | 16 | infinite-scroll-disabled="loading" |
| 17 | 17 | :infinite-scroll-distance="list.length"> |
| 18 | - <li v-for="(item, index) in list" :key="index"> | |
| 19 | - | |
| 20 | 18 | <!-- 达人列表组件 --> |
| 21 | 19 | <dresserList @toDetail="toDetail" |
| 22 | - :dresserList="item"> | |
| 20 | + :dresserList="list"> | |
| 23 | 21 | </dresserList> |
| 24 | - </li> | |
| 25 | - </ul> | |
| 22 | + </div> | |
| 26 | 23 | </div> |
| 27 | 24 | <!-- </van-pull-refresh> --> |
| 28 | 25 | </div> |
| ... | ... | @@ -141,9 +138,19 @@ |
| 141 | 138 | * @param {object} item [数据对象] |
| 142 | 139 | */ |
| 143 | 140 | toDetail(item) { |
| 144 | - | |
| 145 | 141 | // 判断并调用通用跳转 |
| 146 | 142 | if (typeof this.$parent.gotoDetail === "function") { |
| 143 | + | |
| 144 | + // 临时,设置跳转达人个人主页用户数据 | |
| 145 | + Object.assign(item, { | |
| 146 | + type: "5", | |
| 147 | + to: (this.mode == "prod") ? "https://managemall.cnlive.com/html/preferred-library/1/#/pages/darenProfile/darenProfile?from=redirect" + "&id=" + item.id : "https://wjjshop.cnlive.com/html/preferred-library/1/#/pages/darenProfile/darenProfile?from=redirect"+ "&id=" + item.id, | |
| 148 | + shop_type: "" | |
| 149 | + }); | |
| 150 | + | |
| 151 | + | |
| 152 | + console.log("userJump", item); | |
| 153 | + | |
| 147 | 154 | this.$parent.gotoDetail(item); |
| 148 | 155 | } |
| 149 | 156 | }, | ... | ... |
src/pages/moreDynamic/moreDynamic.less
0 → 100644
| 1 | +.fans-shop-message-list-box { | |
| 2 | + /deep/ .van-pull-refresh { | |
| 3 | + .van-pull-refresh__track { | |
| 4 | + .van-pull-refresh__head { | |
| 5 | + font-size: 30px; | |
| 6 | + } | |
| 7 | + } | |
| 8 | + } | |
| 9 | + .title{ | |
| 10 | + margin: 30px; | |
| 11 | + height:50px; | |
| 12 | + font-size:36px; | |
| 13 | + font-weight:600; | |
| 14 | + color:rgba(74,74,74,1); | |
| 15 | + line-height:50px; | |
| 16 | + } | |
| 17 | + .item_box{ | |
| 18 | + height: calc(100vh-110px); | |
| 19 | + width: 100%; | |
| 20 | + overflow-y: auto; | |
| 21 | + } | |
| 22 | +} | ... | ... |
src/pages/moreDynamic/moreDynamic.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <div class="fans-shop-message-list-box"> | |
| 3 | + | |
| 4 | + <!-- nav --> | |
| 5 | + <back-box :style="'padding-top: ' + ($parent.top.value) + 'px'" @back="back" | |
| 6 | + :backs="backs"> | |
| 7 | + </back-box> | |
| 8 | + | |
| 9 | + <!-- 下拉刷新 --> | |
| 10 | + <!-- <van-pull-refresh v-model="isLoading" pulling-text="下拉刷新..." loosing-text="释放刷新" loading-text="加载中..." success-text="刷新成功" @refresh="onRefresh"> --> | |
| 11 | + | |
| 12 | + <!-- 已关注达人列表 --> | |
| 13 | + <div class="item_box"> | |
| 14 | + <div | |
| 15 | + infinite-scroll-immediate-check="true" | |
| 16 | + v-infinite-scroll="getNewDynamicList" | |
| 17 | + infinite-scroll-disabled="loading" | |
| 18 | + :infinite-scroll-distance="50"> | |
| 19 | + <daren-list-box class="daren-list" @userJump="userJump" @jump="jump" @goodsJump="goodsJump" @goodsPrimary="goodsPrimary" | |
| 20 | + :lists="recommendedDarenMore"> | |
| 21 | + </daren-list-box> | |
| 22 | + </div> | |
| 23 | + </div> | |
| 24 | + <!-- </van-pull-refresh> --> | |
| 25 | + </div> | |
| 26 | +</template> | |
| 27 | + | |
| 28 | +<script> | |
| 29 | + import { Toast, Indicator } from "mint-ui"; | |
| 30 | + import darenListBox from "@/components/darenListBox/darenListBox"; | |
| 31 | + import backBox from "@/components/backBox/backBox"; | |
| 32 | + export default { | |
| 33 | + name: 'recommendedDaren', | |
| 34 | + data () { | |
| 35 | + return { | |
| 36 | + backs: { // nav导航条数据 | |
| 37 | + title: "已关注达人动态", | |
| 38 | + funcs: { | |
| 39 | + back: { | |
| 40 | + icon: "static/img/icon_back.png" | |
| 41 | + } | |
| 42 | + } | |
| 43 | + }, | |
| 44 | + loading: false, // 加载 | |
| 45 | + pages:0, // 分页 | |
| 46 | + recommendedDarenMore:null | |
| 47 | + } | |
| 48 | + }, | |
| 49 | + components:{ | |
| 50 | + darenListBox, | |
| 51 | + backBox | |
| 52 | + }, | |
| 53 | + created(){ | |
| 54 | + // 设置标题 | |
| 55 | + this.$set(this, "title", "已关注达人动态"); | |
| 56 | + document.title = "已关注达人动态" | |
| 57 | + // 已关注达人更多动态 | |
| 58 | + this.getNewDynamicList(); | |
| 59 | + }, | |
| 60 | + methods: { | |
| 61 | + /** | |
| 62 | + * 达人最新动态 | |
| 63 | + */ | |
| 64 | + getNewDynamicList() { | |
| 65 | + this.loading = true; | |
| 66 | + this.pages++ | |
| 67 | + // 加载中提示 | |
| 68 | + Indicator.open("加载中..."); | |
| 69 | + | |
| 70 | + // 获取证书请求接口 | |
| 71 | + this.http("/Api/" + this.getApiVersion().dynamic + "/getNewDynamicList", { | |
| 72 | + uid: this.getStore("uid") || 0, | |
| 73 | + page: this.pages, | |
| 74 | + type: 2 | |
| 75 | + }, this.getNewDynamicListCallback, { | |
| 76 | + method: "post" | |
| 77 | + } | |
| 78 | + ); | |
| 79 | + }, | |
| 80 | + | |
| 81 | + /** | |
| 82 | + * 达人最新动态回调 | |
| 83 | + * @param {object} res [服务器返回数据] | |
| 84 | + * @param {object} ext [扩展参数] | |
| 85 | + */ | |
| 86 | + getNewDynamicListCallback(res, ext) { | |
| 87 | + | |
| 88 | + // 加载完成 | |
| 89 | + Indicator.close(); | |
| 90 | + | |
| 91 | + // 返回处理 | |
| 92 | + if (res.code == 200) { | |
| 93 | + // 解构数据 | |
| 94 | + let { data: datas } = res; | |
| 95 | + // 设置shopFnsDynamic达人动态数据 | |
| 96 | + | |
| 97 | + if (datas.list && datas.list.length) { | |
| 98 | + // 隐藏加载圈 | |
| 99 | + this.loading = false; | |
| 100 | + if(this.pages>1){ | |
| 101 | + this.$set(this, "recommendedDarenMore",[...this.recommendedDarenMore,...datas.list]); | |
| 102 | + }else { | |
| 103 | + this.$set(this, "recommendedDarenMore",datas.list); | |
| 104 | + } | |
| 105 | + // 将视频地址加入到图片数组中 | |
| 106 | + if(this.recommendedDarenMore&&this.recommendedDarenMore.length>0) { | |
| 107 | + for (let item of this.recommendedDarenMore) { | |
| 108 | + // 将视频图片加入图片数组,方便循环输出 | |
| 109 | + if (item.video_img) { | |
| 110 | + this.$set(item, "img", [...[item.video_img], ...item.img]); | |
| 111 | + } | |
| 112 | + } | |
| 113 | + } | |
| 114 | + } | |
| 115 | + /* 获取达人动态数据 结束 */ | |
| 116 | + | |
| 117 | + } else if (res.code == 400) { | |
| 118 | + | |
| 119 | + // 获取达人动态失败 | |
| 120 | + Toast(res.message); | |
| 121 | + } else { | |
| 122 | + | |
| 123 | + // 获取优选库精选活动失败 | |
| 124 | + Toast("获取达人动态失败"); | |
| 125 | + } | |
| 126 | + }, | |
| 127 | + /** | |
| 128 | + * 用户头像/昵称,点击跳转 | |
| 129 | + * @param {object} item [数据对象] | |
| 130 | + */ | |
| 131 | + userJump(item) { | |
| 132 | + // 判断并调用通用跳转 | |
| 133 | + if (typeof this.$parent.gotoDetail === "function") { | |
| 134 | + | |
| 135 | + // 临时,设置跳转达人个人主页用户数据 | |
| 136 | + Object.assign(item, { | |
| 137 | + type: "5", | |
| 138 | + to: (this.mode == "prod") ? | |
| 139 | + "https://managemall.cnlive.com/html/preferred-library/1/#/pages/darenProfile/darenProfile?from=redirect" + "&id=" + (item.type==2?item.uid:item.id) + "&uid=" + this.getStore("uid") | |
| 140 | + : "https://wjjshop.cnlive.com/html/preferred-library/1/#/pages/darenProfile/darenProfile?from=redirect"+ "&id=" + (item.type==2?item.uid:item.id) + "&uid=" + this.getStore("uid"), | |
| 141 | + shop_type: "" | |
| 142 | + }); | |
| 143 | + | |
| 144 | + | |
| 145 | + console.log("userJump", item); | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + this.$parent.gotoDetail(item); | |
| 151 | + } | |
| 152 | + }, | |
| 153 | + | |
| 154 | + /** | |
| 155 | + * 跳转达人动态详情 | |
| 156 | + * @param {object} item [数据对象] | |
| 157 | + */ | |
| 158 | + jump(item) { | |
| 159 | + // 判断并调用通用跳转 | |
| 160 | + if (typeof this.$parent.gotoDetail === "function") { | |
| 161 | + | |
| 162 | + | |
| 163 | + // 临时,设置跳转参数,跳转达人动态详情页面 | |
| 164 | + Object.assign(item, { | |
| 165 | + type: "5", | |
| 166 | + to: (this.mode == "prod") ? | |
| 167 | + "https://managemall.cnlive.com/html/preferred-library/1/#/pages/darenProfileDynamicDetail/darenProfileDynamicDetail?from=redirect" + "&id=" + item.id + "&uid=" + this.getStore("uid") | |
| 168 | + : "https://wjjshop.cnlive.com/html/preferred-library/1/#/pages/darenProfileDynamicDetail/darenProfileDynamicDetail?from=redirect"+ "&id=" + item.id + "&uid=" + this.getStore("uid"), | |
| 169 | + shop_type: "" | |
| 170 | + }); | |
| 171 | + | |
| 172 | + | |
| 173 | + console.log("jump", item); | |
| 174 | + | |
| 175 | + | |
| 176 | + this.$parent.gotoDetail(item); | |
| 177 | + } | |
| 178 | + }, | |
| 179 | + | |
| 180 | + /** | |
| 181 | + * 点击跳转商品 | |
| 182 | + * @param {object} item [数据对象] | |
| 183 | + */ | |
| 184 | + goodsJump(item) { | |
| 185 | + | |
| 186 | + // 判断并调用通用跳转 | |
| 187 | + if (typeof this.$parent.gotoDetail === "function") { | |
| 188 | + | |
| 189 | + // 临时,设置跳转商品详情参数 | |
| 190 | + Object.assign(item, { | |
| 191 | + type: "2", | |
| 192 | + to: item.id, | |
| 193 | + shop_type: "1" | |
| 194 | + }); | |
| 195 | + | |
| 196 | + | |
| 197 | + console.log("goodsJump", item); | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + this.$parent.gotoDetail(item); | |
| 202 | + } | |
| 203 | + }, | |
| 204 | + | |
| 205 | + /** | |
| 206 | + * 点击跳转商品购买 | |
| 207 | + * @param {object} item [数据对象] | |
| 208 | + */ | |
| 209 | + goodsPrimary(item) { | |
| 210 | + | |
| 211 | + // 判断并调用通用跳转 | |
| 212 | + if (typeof this.$parent.gotoDetail === "function") { | |
| 213 | + | |
| 214 | + // 临时,设置跳转商品详情参数 | |
| 215 | + Object.assign(item, { | |
| 216 | + type: "2", | |
| 217 | + to: "9525393", | |
| 218 | + shop_type: "1" | |
| 219 | + }); | |
| 220 | + | |
| 221 | + | |
| 222 | + console.log("goodsPrimary", item); | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + this.$parent.gotoDetail(item); | |
| 227 | + } | |
| 228 | + }, | |
| 229 | + /** | |
| 230 | + * 后退 | |
| 231 | + */ | |
| 232 | + back() { | |
| 233 | + | |
| 234 | + // 判断是否有后退函数 | |
| 235 | + if (typeof this.$parent.back === "function") { | |
| 236 | + | |
| 237 | + // 调用后退 | |
| 238 | + this.$parent.back(); | |
| 239 | + } else { | |
| 240 | + | |
| 241 | + // 后退 | |
| 242 | + window.history.go(-1); | |
| 243 | + } | |
| 244 | + } | |
| 245 | + } | |
| 246 | + } | |
| 247 | +</script> | |
| 248 | + | |
| 249 | +<!-- Add "scoped" attribute to limit CSS to this component only --> | |
| 250 | +<style rel="stylesheet/less" lang="less" scoped> | |
| 251 | + @import "moreDynamic"; | |
| 252 | +</style> | ... | ... |
src/pages/myGiftBox/myGiftBox.less
0 → 100644
| 1 | +.my_gift_box { | |
| 2 | + width: 100%; | |
| 3 | + // height: calc(100vh-25px); | |
| 4 | + background-color: #fff; | |
| 5 | + padding-top: 25px; | |
| 6 | + .top_box { | |
| 7 | + display: flex; | |
| 8 | + justify-content: space-between; | |
| 9 | + margin: 0 30px; | |
| 10 | + img { | |
| 11 | + width: 37px; | |
| 12 | + height: 37px; | |
| 13 | + margin: 4px 0; | |
| 14 | + } | |
| 15 | + .tabs { | |
| 16 | + flex: 1; | |
| 17 | + margin: 0 134px 0 200px; | |
| 18 | + // tab边框 | |
| 19 | + .van-hairline--top-bottom::after, | |
| 20 | + .van-hairline-unset--top-bottom::after { | |
| 21 | + border-width: 0; | |
| 22 | + } | |
| 23 | + .van-tabs__line { | |
| 24 | + width: 26px !important; | |
| 25 | + height: 4px; | |
| 26 | + background: rgba(208, 2, 27, 1); | |
| 27 | + border-radius: 3px; | |
| 28 | + } | |
| 29 | + .van-tab { | |
| 30 | + font-size: 32px; | |
| 31 | + font-weight: 400; | |
| 32 | + color: rgba(153, 153, 153, 1); | |
| 33 | + height: 45px; | |
| 34 | + line-height: 32px; | |
| 35 | + } | |
| 36 | + .van-tab--active{ | |
| 37 | + color: #D0021B; | |
| 38 | + } | |
| 39 | + } | |
| 40 | + .desc { | |
| 41 | + width: 114px; | |
| 42 | + height: 45px; | |
| 43 | + font-size: 26px; | |
| 44 | + font-weight: 400; | |
| 45 | + color: rgba(153, 153, 153, 1); | |
| 46 | + line-height: 45px; | |
| 47 | + } | |
| 48 | + } | |
| 49 | +} | ... | ... |
src/pages/myGiftBox/myGiftBox.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <div class="my_gift_box"> | |
| 3 | + <!--tab切换--> | |
| 4 | + <div class="top_box" :style="'padding-top: ' + ($parent.top.value) + 'px'"> | |
| 5 | + <img src="static/img/icon_back.png" /> | |
| 6 | + <div class="tabs"> | |
| 7 | + <van-tabs @change="onTap" v-model="active"> | |
| 8 | + <van-tab title="收礼"></van-tab> | |
| 9 | + <van-tab title="送礼"></van-tab> | |
| 10 | + </van-tabs> | |
| 11 | + </div> | |
| 12 | + <div class="desc">规则说明</div> | |
| 13 | + </div> | |
| 14 | + <!--内容--> | |
| 15 | + <div | |
| 16 | + infinite-scroll-immediate-check="true" | |
| 17 | + v-infinite-scroll="getorderGiftList" | |
| 18 | + infinite-scroll-disabled="loading" | |
| 19 | + :infinite-scroll-distance="50" | |
| 20 | + > | |
| 21 | + <!-- 送礼列表 --> | |
| 22 | + <receiving-gifts-item | |
| 23 | + v-show="active != 1 && active == 0" | |
| 24 | + @giftInReturn="giftInReturn" | |
| 25 | + :receivingGiftsInfo="receivingGiftsInfo" | |
| 26 | + ></receiving-gifts-item> | |
| 27 | + <!-- 收礼列表 --> | |
| 28 | + <giftGivingItem | |
| 29 | + v-show="active != 0 && active == 1" | |
| 30 | + :giftGivingItem="giftGivingItem" | |
| 31 | + > | |
| 32 | + </giftGivingItem> | |
| 33 | + </div> | |
| 34 | + </div> | |
| 35 | +</template> | |
| 36 | + | |
| 37 | +<script> | |
| 38 | +// 引入组件 | |
| 39 | +import { Toast, Indicator } from "mint-ui"; | |
| 40 | +import receivingGiftsItem from "@/components/receivingGiftsItem/receivingGiftsItem"; // 收礼列表 | |
| 41 | +import giftGivingItem from "@/components/giftGivingItem/giftGivingItem"; // 送礼列表 | |
| 42 | +export default { | |
| 43 | + name: "myGiftBox", | |
| 44 | + data() { | |
| 45 | + return { | |
| 46 | + active: 0, | |
| 47 | + receivingGiftsInfo: null, // 收礼列表页数据 | |
| 48 | + receivingGifts: { | |
| 49 | + loading: false, // 加载 | |
| 50 | + pages: 0 // 分页 | |
| 51 | + }, | |
| 52 | + giftGivingItem: null, // 送礼列表页数据 | |
| 53 | + giftGiving: { | |
| 54 | + loading: false, // 加载 | |
| 55 | + pages: 0 // 分页 | |
| 56 | + } | |
| 57 | + }; | |
| 58 | + }, | |
| 59 | + components: { | |
| 60 | + receivingGiftsItem, | |
| 61 | + giftGivingItem | |
| 62 | + }, | |
| 63 | + created() { | |
| 64 | + // 收礼订单列表 | |
| 65 | + this.getorderGiftList(); | |
| 66 | + // 送礼订单列表 | |
| 67 | + this.getorderGiveGiftList(); | |
| 68 | + }, | |
| 69 | + methods: { | |
| 70 | + onTap(active) { | |
| 71 | + this.active = active; | |
| 72 | + }, | |
| 73 | + /** | |
| 74 | + * 获取收礼礼物列表 | |
| 75 | + */ | |
| 76 | + getorderGiftList() { | |
| 77 | + this.receivingGifts.loading = true; | |
| 78 | + this.receivingGifts.pages++; | |
| 79 | + // 加载中提示 | |
| 80 | + Indicator.open("加载中..."); | |
| 81 | + | |
| 82 | + // 获取收礼礼物列表接口 | |
| 83 | + this.http( | |
| 84 | + "/Api/" + this.getApiVersion().index + "/orderGiftList", | |
| 85 | + { | |
| 86 | + uid: this.$route.query.uid, // 用户id | |
| 87 | + page: this.receivingGifts.pages, // 分页 默认为1 一页20条 | |
| 88 | + type: 1, // 1 收礼列表 2 送礼列表(送礼已废弃) | |
| 89 | + status: 0 // 0或者不传 全部 1 未填地址 2 未发货 3 已完成 4 已发货 | |
| 90 | + }, | |
| 91 | + this.getorderGiftListCallback, | |
| 92 | + { | |
| 93 | + method: "post" | |
| 94 | + } | |
| 95 | + ); | |
| 96 | + }, | |
| 97 | + | |
| 98 | + /** | |
| 99 | + * 获取收礼礼物列表回调 | |
| 100 | + * @param {object} res [服务器返回数据] | |
| 101 | + * @param {object} ext [扩展参数] | |
| 102 | + */ | |
| 103 | + getorderGiftListCallback(res, ext) { | |
| 104 | + // 加载完成 | |
| 105 | + Indicator.close(); | |
| 106 | + | |
| 107 | + // 返回处理 | |
| 108 | + if (res.code == 200) { | |
| 109 | + // 解构数据 | |
| 110 | + let { data: datas } = res; | |
| 111 | + // 设置shopFnsDynamic达人动态数据 | |
| 112 | + | |
| 113 | + if (datas.list && datas.list.length) { | |
| 114 | + // 隐藏加载圈 | |
| 115 | + this.receivingGifts.loading = false; | |
| 116 | + if (this.pages > 1) { | |
| 117 | + this.$set(this, "receivingGiftsInfo", [ | |
| 118 | + ...this.receivingGiftsInfo, | |
| 119 | + ...datas.list | |
| 120 | + ]); | |
| 121 | + } else { | |
| 122 | + this.$set(this, "receivingGiftsInfo", datas.list); | |
| 123 | + } | |
| 124 | + } | |
| 125 | + /* 获取达人动态数据 结束 */ | |
| 126 | + } else if (res.code == 400) { | |
| 127 | + // 获取达人动态失败 | |
| 128 | + Toast(res.message); | |
| 129 | + } else { | |
| 130 | + // 获取优选库精选活动失败 | |
| 131 | + Toast("获取收礼订单列表失败"); | |
| 132 | + } | |
| 133 | + }, | |
| 134 | + // 跳转回赠礼物 | |
| 135 | + giftInReturn(item) { | |
| 136 | + // 判断并调用通用跳转 | |
| 137 | + if (typeof this.$parent.gotoDetail === "function") { | |
| 138 | + // 临时,设置跳转商品详情参数 | |
| 139 | + Object.assign(item, { | |
| 140 | + type: "14", | |
| 141 | + to: "", | |
| 142 | + shop_type: "" | |
| 143 | + }); | |
| 144 | + | |
| 145 | + this.$parent.gotoDetail(item); | |
| 146 | + } | |
| 147 | + }, | |
| 148 | + /** | |
| 149 | + * 获取送礼礼物列表 | |
| 150 | + */ | |
| 151 | + getorderGiveGiftList() { | |
| 152 | + this.giftGiving.loading = true; | |
| 153 | + this.giftGiving.pages++; | |
| 154 | + // 加载中提示 | |
| 155 | + Indicator.open("加载中..."); | |
| 156 | + | |
| 157 | + // 获取送礼礼物列表接口 | |
| 158 | + this.http( | |
| 159 | + "/Api/" + this.getApiVersion().index + "/orderGiveGiftList", | |
| 160 | + { | |
| 161 | + uid: this.$route.query.uid, // 用户id | |
| 162 | + page: this.giftGiving.pages, // 分页 默认为1 一页20条 | |
| 163 | + type: 1, // 1 收礼列表 2 送礼列表(送礼已废弃) | |
| 164 | + status: 0 // 0或者不传 全部 1 未填地址 2 未发货 3 已完成 4 已发货 | |
| 165 | + }, | |
| 166 | + this.getorderGiveGiftListCallback, | |
| 167 | + { | |
| 168 | + method: "post" | |
| 169 | + } | |
| 170 | + ); | |
| 171 | + }, | |
| 172 | + | |
| 173 | + /** | |
| 174 | + * 获取送礼礼物列表回调 | |
| 175 | + * @param {object} res [服务器返回数据] | |
| 176 | + * @param {object} ext [扩展参数] | |
| 177 | + */ | |
| 178 | + getorderGiveGiftListCallback(res, ext) { | |
| 179 | + // 加载完成 | |
| 180 | + Indicator.close(); | |
| 181 | + | |
| 182 | + // 返回处理 | |
| 183 | + if (res.code == 200) { | |
| 184 | + // 解构数据 | |
| 185 | + let { data: datas } = res; | |
| 186 | + // 设置giftGivingItem数据 | |
| 187 | + | |
| 188 | + if (datas.list && datas.list.length) { | |
| 189 | + // 隐藏加载圈 | |
| 190 | + this.giftGiving.loading = false; | |
| 191 | + if (this.pages > 1) { | |
| 192 | + this.$set(this, "giftGivingItem", [ | |
| 193 | + ...this.giftGivingItem, | |
| 194 | + ...datas.list | |
| 195 | + ]); | |
| 196 | + } else { | |
| 197 | + this.$set(this, "giftGivingItem", datas.list); | |
| 198 | + } | |
| 199 | + console.log(this.giftGivingItem); | |
| 200 | + } | |
| 201 | + /* 获取送礼订单列表 结束 */ | |
| 202 | + } else if (res.code == 400) { | |
| 203 | + // 获取送礼订单列表失败 | |
| 204 | + Toast(res.message); | |
| 205 | + } else { | |
| 206 | + // 获取送礼订单列表失败 | |
| 207 | + Toast("获取送礼订单列表失败"); | |
| 208 | + } | |
| 209 | + } | |
| 210 | + } | |
| 211 | +}; | |
| 212 | +</script> | |
| 213 | + | |
| 214 | +<!-- Add "scoped" attribute to limit CSS to this component only --> | |
| 215 | +<style rel="stylesheet/less" lang="less"> | |
| 216 | +@import "myGiftBox"; | |
| 217 | +</style> | ... | ... |
src/pages/newDaren/newDaren.less
0 → 100644
src/pages/newDaren/newDaren.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <div class="daren-list"> | |
| 3 | + <!--轮播--> | |
| 4 | + <swiper v-if="banner" | |
| 5 | + :swipers="banner" | |
| 6 | + :options="{ | |
| 7 | + showIndicators: false | |
| 8 | + }"> | |
| 9 | + </swiper> | |
| 10 | + <!--达人信息--> | |
| 11 | + <shop-daten-top v-if="shopDatenTop" @userJump="userJump" :shopDatenTop="shopDatenTop"></shop-daten-top> | |
| 12 | + <!--推荐达人--> | |
| 13 | + <!-- 最新动态标题 --> | |
| 14 | + <text-title-box v-if="shopDarenHot && shopDarenHot.length" slot="title-box" @more="recommendedDaren" | |
| 15 | + :titles="{ | |
| 16 | + title: '推荐达人', | |
| 17 | + more: true | |
| 18 | + }"> | |
| 19 | + </text-title-box> | |
| 20 | + <!--导航--> | |
| 21 | + <horiz-list class="components-box" v-if="shopDarenHot && shopDarenHot.length" @jump="jump" @userJump="userJump" @fansShop="fansShop" | |
| 22 | + :lists="shopDarenHot" | |
| 23 | + com="5"> | |
| 24 | + </horiz-list> | |
| 25 | + <!-- 已关注达人 --> | |
| 26 | + <daren-list-box class="daren-list" @userJump="userJump" @jump="jump" @goodsJump="goodsJump" @goodsPrimary="goodsPrimary" | |
| 27 | + :lists="fansDaren"> | |
| 28 | + | |
| 29 | + <!-- 最新动态标题 --> | |
| 30 | + <text-title-box v-if="fansDaren && fansDaren.length" slot="title-box" @more="moreDynamic" | |
| 31 | + :titles="{ | |
| 32 | + title: '已关注达人', | |
| 33 | + more: true | |
| 34 | + }"> | |
| 35 | + </text-title-box> | |
| 36 | + </daren-list-box> | |
| 37 | + <div class="item_box"> | |
| 38 | + <div | |
| 39 | + infinite-scroll-immediate-check="true" | |
| 40 | + v-infinite-scroll="getNewDynamicList" | |
| 41 | + infinite-scroll-disabled="loading" | |
| 42 | + :infinite-scroll-distance="50"> | |
| 43 | + <daren-list-box class="daren-list" @userJump="userJump" @jump="jump" @goodsJump="goodsJump" @goodsPrimary="goodsPrimary" | |
| 44 | + :lists="shopFnsDynamic"> | |
| 45 | + <!--最新达人动态--> | |
| 46 | + <text-title-box v-if="shopFnsDynamic && shopFnsDynamic.length" slot="title-box" | |
| 47 | + :titles="{ | |
| 48 | + title: '最新达人动态', | |
| 49 | + more: false | |
| 50 | + }"> | |
| 51 | + </text-title-box> | |
| 52 | + </daren-list-box> | |
| 53 | + </div> | |
| 54 | + </div> | |
| 55 | + </div> | |
| 56 | +</template> | |
| 57 | + | |
| 58 | +<script> | |
| 59 | + | |
| 60 | + // 引入组件 | |
| 61 | + import { Toast, Indicator } from "mint-ui"; | |
| 62 | + import swiper from "@/components/swiper/swiper"; | |
| 63 | + import darenListBox from "@/components/darenListBox/darenListBox"; | |
| 64 | + import textTitleBox from "@/components/textTitleBox/textTitleBox"; | |
| 65 | + import shopDatenTop from "@/components/shopDatenTop/shopDatenTop"; | |
| 66 | + import horizList from "@/components/horizList/horizList"; | |
| 67 | + export default { | |
| 68 | + name: "darenList", | |
| 69 | + data() { | |
| 70 | + return { | |
| 71 | + title: "", // 标题 | |
| 72 | + shopDatenTop: null, // 置顶达人信息 | |
| 73 | + banner:[], // 轮播 | |
| 74 | + shopDarenHot: null, // 达人推荐列表 | |
| 75 | + fansDaren: null, // 已关注达人动态 | |
| 76 | + shopFnsDynamic: null, // 达人动态 | |
| 77 | + loading: false, // 加载 | |
| 78 | + pages:0 // 分页 | |
| 79 | + } | |
| 80 | + }, | |
| 81 | + components:{ | |
| 82 | + darenListBox, | |
| 83 | + textTitleBox, | |
| 84 | + swiper, | |
| 85 | + shopDatenTop, | |
| 86 | + horizList | |
| 87 | + }, | |
| 88 | + created() { | |
| 89 | + | |
| 90 | + // 设置标题 | |
| 91 | + this.$set(this, "title", "达人"); | |
| 92 | + | |
| 93 | + // 获取优选库精选活动 | |
| 94 | + this.newDarenIndex(); | |
| 95 | + // 达人最新动态 | |
| 96 | + this.getNewDynamicList(); | |
| 97 | + }, | |
| 98 | + methods: { | |
| 99 | + /** | |
| 100 | + * 达人最新动态 | |
| 101 | + */ | |
| 102 | + getNewDynamicList() { | |
| 103 | + this.loading = true; | |
| 104 | + this.pages++ | |
| 105 | + // 加载中提示 | |
| 106 | + Indicator.open("加载中..."); | |
| 107 | + | |
| 108 | + // 获取证书请求接口 | |
| 109 | + this.http("/Api/" + this.getApiVersion().dynamic + "/getNewDynamicList", { | |
| 110 | + uid: this.$route.query.uid, | |
| 111 | + page: this.pages, | |
| 112 | + type: 1 | |
| 113 | + }, this.getNewDynamicListCallback, { | |
| 114 | + method: "post" | |
| 115 | + } | |
| 116 | + ); | |
| 117 | + }, | |
| 118 | + | |
| 119 | + /** | |
| 120 | + * 达人最新动态回调 | |
| 121 | + * @param {object} res [服务器返回数据] | |
| 122 | + * @param {object} ext [扩展参数] | |
| 123 | + */ | |
| 124 | + getNewDynamicListCallback(res, ext) { | |
| 125 | + | |
| 126 | + // 加载完成 | |
| 127 | + Indicator.close(); | |
| 128 | + | |
| 129 | + // 返回处理 | |
| 130 | + if (res.code == 200) { | |
| 131 | + // 解构数据 | |
| 132 | + let { data: datas } = res; | |
| 133 | + // 设置shopFnsDynamic达人动态数据 | |
| 134 | + | |
| 135 | + if (datas.list && datas.list.length) { | |
| 136 | + // 隐藏加载圈 | |
| 137 | + this.loading = false; | |
| 138 | + if(this.pages>1){ | |
| 139 | + this.$set(this, "shopFnsDynamic",[...this.shopFnsDynamic,...datas.list]); | |
| 140 | + }else { | |
| 141 | + this.$set(this, "shopFnsDynamic",datas.list); | |
| 142 | + } | |
| 143 | + // 将视频地址加入到图片数组中 | |
| 144 | + if(this.shopFnsDynamic&&this.shopFnsDynamic.length>0) { | |
| 145 | + for (let item of this.shopFnsDynamic) { | |
| 146 | + // 将视频图片加入图片数组,方便循环输出 | |
| 147 | + if (item.video_img) { | |
| 148 | + this.$set(item, "img", [...[item.video_img], ...item.img]); | |
| 149 | + } | |
| 150 | + } | |
| 151 | + } | |
| 152 | + } | |
| 153 | + /* 获取达人动态数据 结束 */ | |
| 154 | + | |
| 155 | + } else if (res.code == 400) { | |
| 156 | + | |
| 157 | + // 获取达人动态失败 | |
| 158 | + Toast(res.message); | |
| 159 | + } else { | |
| 160 | + | |
| 161 | + // 获取优选库精选活动失败 | |
| 162 | + Toast("获取达人动态失败"); | |
| 163 | + } | |
| 164 | + }, | |
| 165 | + // 下拉刷新 | |
| 166 | + // onRefresh() { | |
| 167 | + | |
| 168 | + // // 下拉刷新中 | |
| 169 | + // this.$set(this, "isLoading", true); | |
| 170 | + | |
| 171 | + // // 获取优选库精选活动 | |
| 172 | + // this.activityAd(); | |
| 173 | + // }, | |
| 174 | + | |
| 175 | + /** | |
| 176 | + * 获取优选库精选活动 | |
| 177 | + */ | |
| 178 | + newDarenIndex() { | |
| 179 | + // 加载中提示 | |
| 180 | + Indicator.open("加载中..."); | |
| 181 | + | |
| 182 | + // 获取证书请求接口 | |
| 183 | + this.http("/Api/" + this.getApiVersion().index + "/newDarenIndex", { | |
| 184 | + uid: this.$route.query.uid | |
| 185 | + }, this.newDarenIndexCallback, { | |
| 186 | + method: "post" | |
| 187 | + } | |
| 188 | + ); | |
| 189 | + }, | |
| 190 | + | |
| 191 | + /** | |
| 192 | + * 获取优选库精选活动回调 | |
| 193 | + * @param {object} res [服务器返回数据] | |
| 194 | + * @param {object} ext [扩展参数] | |
| 195 | + */ | |
| 196 | + newDarenIndexCallback(res, ext) { | |
| 197 | + | |
| 198 | + // 加载完成 | |
| 199 | + Indicator.close(); | |
| 200 | + | |
| 201 | + // 下拉刷新结束 | |
| 202 | + this.$set(this, "isLoading", false); | |
| 203 | + | |
| 204 | + // 返回处理 | |
| 205 | + if (res.code == 200) { | |
| 206 | + | |
| 207 | + // 解构数据 | |
| 208 | + let { data: datas } = res; | |
| 209 | + | |
| 210 | + /* 获取优选库精选活动数据 开始 */ | |
| 211 | + if(datas.title){ | |
| 212 | + // 设置标题 | |
| 213 | + this.$set(this, "title", datas.title); | |
| 214 | + } | |
| 215 | + | |
| 216 | + | |
| 217 | + // 设置banner数据 | |
| 218 | + | |
| 219 | + this.banner.push(datas.shop_daten_ads) | |
| 220 | + // 设置shopDatenTop置顶达人数据 | |
| 221 | + | |
| 222 | + if (datas.shop_daten_top) { | |
| 223 | + this.$set(this, "shopDatenTop", datas.shop_daten_top); | |
| 224 | + } | |
| 225 | + // 设置shopDarenHot达人推荐数据 | |
| 226 | + | |
| 227 | + if (datas.shop_daren_hot && datas.shop_daren_hot.length) { | |
| 228 | + this.$set(this, "shopDarenHot", datas.shop_daren_hot); | |
| 229 | + } | |
| 230 | + // 设置fansDaren已关注达人动态数据 | |
| 231 | + | |
| 232 | + if (datas.shop_fans_dynamic && datas.shop_fans_dynamic.length) { | |
| 233 | + this.$set(this, "fansDaren", datas.shop_fans_dynamic); | |
| 234 | + // 将视频地址加入到图片数组中 | |
| 235 | + for (let item of this.fansDaren) { | |
| 236 | + // 将视频图片加入图片数组,方便循环输出 | |
| 237 | + if (item.video_img) { | |
| 238 | + this.$set(item, "img", [...[item.video_img], ...item.img]); | |
| 239 | + } | |
| 240 | + } | |
| 241 | + } | |
| 242 | + console.log(this.fansDaren) | |
| 243 | + /* 获取优选库精选活动数据 结束 */ | |
| 244 | + | |
| 245 | + } else if (res.code == 400) { | |
| 246 | + | |
| 247 | + // 获取优选库精选活动失败 | |
| 248 | + Toast(res.message); | |
| 249 | + } else { | |
| 250 | + | |
| 251 | + // 获取优选库精选活动失败 | |
| 252 | + Toast("获取优选库精选活动失败"); | |
| 253 | + } | |
| 254 | + }, | |
| 255 | + /** | |
| 256 | + * 关注/取消关注达人 | |
| 257 | + */ | |
| 258 | + fansShop(item) { | |
| 259 | + Indicator.open("加载中..."); | |
| 260 | + // 判断必要参数 | |
| 261 | + if (item.id && this.$route.query.uid) { | |
| 262 | + // 请求接口 | |
| 263 | + this.http("/Api/" + this.getApiVersion().dynamic + "/fansShop", { | |
| 264 | + id: item.id || 0, | |
| 265 | + uid: this.$route.query.uid || 0 | |
| 266 | + }, this.fansShopCallback, { | |
| 267 | + method: "post", | |
| 268 | + item | |
| 269 | + } | |
| 270 | + ); | |
| 271 | + } | |
| 272 | + }, | |
| 273 | + | |
| 274 | + /** | |
| 275 | + * 关注/取消关注达人回调 | |
| 276 | + * @param {object} res [服务器返回数据] | |
| 277 | + * @param {object} ext [扩展参数] | |
| 278 | + */ | |
| 279 | + fansShopCallback(res, ext) { | |
| 280 | + | |
| 281 | + // 加载完成 | |
| 282 | + Indicator.close(); | |
| 283 | + if (res.code) { | |
| 284 | + // 设置已关注 | |
| 285 | + if (ext.item.is_fans == "0") { | |
| 286 | + // 关注达人 | |
| 287 | + this.$set(ext.item, "is_fans", "1"); | |
| 288 | + }else{ | |
| 289 | + // 取消关注达人 | |
| 290 | + this.$set(ext.item, "is_fans", "0"); | |
| 291 | + } | |
| 292 | + }else if (res.statusCode === 200 && res.data.code == 400) { | |
| 293 | + | |
| 294 | + // 关注失败 | |
| 295 | + this.showToast(res.data.message); | |
| 296 | + } else { | |
| 297 | + | |
| 298 | + // 关注失败 | |
| 299 | + this.showToast("关注失败"); | |
| 300 | + } | |
| 301 | + }, | |
| 302 | + /** | |
| 303 | + * 调用通用跳转 | |
| 304 | + * @param {object} item [通用跳转对象] | |
| 305 | + */ | |
| 306 | + /** | |
| 307 | + * 已关注达人动态更多页跳转 | |
| 308 | + */ | |
| 309 | + moreDynamic(){ | |
| 310 | + // 判断并调用通用跳转 | |
| 311 | + if (typeof this.$parent.gotoDetail === "function") { | |
| 312 | + | |
| 313 | + // 设置跳转参数 | |
| 314 | + let options = { | |
| 315 | + type: "5", | |
| 316 | + to: (window.location.href.split("#")[0] + "#/moreDynamic?uid=" + this.getStore("uid")), | |
| 317 | + shop_type: "" | |
| 318 | + } | |
| 319 | + this.$parent.gotoDetail(options); | |
| 320 | + } | |
| 321 | + }, | |
| 322 | + toDetail(item) { | |
| 323 | + | |
| 324 | + // 判断是否有通用跳转函数 | |
| 325 | + if (typeof this.$parent.gotoDetail === "function") { | |
| 326 | + | |
| 327 | + // 调用通用跳转 | |
| 328 | + this.$parent.gotoDetail(item); | |
| 329 | + } | |
| 330 | + }, | |
| 331 | + | |
| 332 | + /** | |
| 333 | + * 推荐达人跳转到更多页 | |
| 334 | + */ | |
| 335 | + recommendedDaren() { | |
| 336 | + | |
| 337 | + // 判断并调用通用跳转 | |
| 338 | + if (typeof this.$parent.gotoDetail === "function") { | |
| 339 | + | |
| 340 | + // 设置跳转参数 | |
| 341 | + let options = { | |
| 342 | + type: "5", | |
| 343 | + to: (window.location.href.split("#")[0] + "#/recommendMore?uid=" + this.getStore("uid")), | |
| 344 | + shop_type: "" | |
| 345 | + } | |
| 346 | + this.$parent.gotoDetail(options); | |
| 347 | + } | |
| 348 | + | |
| 349 | + }, | |
| 350 | + | |
| 351 | + /** | |
| 352 | + * 跳转达人动态详情 | |
| 353 | + * @param {object} item [数据对象] | |
| 354 | + */ | |
| 355 | + jump(item) { | |
| 356 | + // 判断并调用通用跳转 | |
| 357 | + if (typeof this.$parent.gotoDetail === "function") { | |
| 358 | + | |
| 359 | + | |
| 360 | + // 临时,设置跳转参数,跳转达人动态详情页面 | |
| 361 | + Object.assign(item, { | |
| 362 | + type: "5", | |
| 363 | + to: (this.mode == "prod") ? | |
| 364 | + "https://managemall.cnlive.com/html/preferred-library/1/#/pages/darenProfileDynamicDetail/darenProfileDynamicDetail?from=redirect" + "&id=" + item.id + "&uid=" + this.getStore("uid") | |
| 365 | + : "https://wjjshop.cnlive.com/html/preferred-library/1/#/pages/darenProfileDynamicDetail/darenProfileDynamicDetail?from=redirect"+ "&id=" + item.id + "&uid=" + this.getStore("uid"), | |
| 366 | + shop_type: "" | |
| 367 | + }); | |
| 368 | + | |
| 369 | + | |
| 370 | + console.log("jump", item); | |
| 371 | + | |
| 372 | + | |
| 373 | + this.$parent.gotoDetail(item); | |
| 374 | + } | |
| 375 | + }, | |
| 376 | + | |
| 377 | + /** | |
| 378 | + * 用户头像/昵称,点击跳转 | |
| 379 | + * @param {object} item [数据对象] | |
| 380 | + * type等于2属于达人跳转传uid,type=1传id | |
| 381 | + */ | |
| 382 | + userJump(item) { | |
| 383 | + // 判断并调用通用跳转 | |
| 384 | + if (typeof this.$parent.gotoDetail === "function") { | |
| 385 | + | |
| 386 | + // 临时,设置跳转达人个人主页用户数据 | |
| 387 | + Object.assign(item, { | |
| 388 | + type: "5", | |
| 389 | + to: (this.mode == "prod") ? | |
| 390 | + "https://managemall.cnlive.com/html/preferred-library/1/#/pages/darenProfile/darenProfile?from=redirect" + "&id=" + (item.type==2?item.uid:item.id) + "&uid=" + this.getStore("uid") : | |
| 391 | + "https://wjjshop.cnlive.com/html/preferred-library/1/#/pages/darenProfile/darenProfile?from=redirect"+ "&id=" + (item.type==2?item.uid:item.id) + "&uid=" + this.getStore("uid"), | |
| 392 | + shop_type: "" | |
| 393 | + }); | |
| 394 | + | |
| 395 | + | |
| 396 | + console.log("userJump", item); | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + this.$parent.gotoDetail(item); | |
| 402 | + } | |
| 403 | + }, | |
| 404 | + | |
| 405 | + /** | |
| 406 | + * 点击跳转商品 | |
| 407 | + * @param {object} item [数据对象] | |
| 408 | + */ | |
| 409 | + goodsJump(item) { | |
| 410 | + | |
| 411 | + // 判断并调用通用跳转 | |
| 412 | + if (typeof this.$parent.gotoDetail === "function") { | |
| 413 | + | |
| 414 | + // 临时,设置跳转商品详情参数 | |
| 415 | + Object.assign(item, { | |
| 416 | + type: "2", | |
| 417 | + to: item.id, | |
| 418 | + shop_type: "1" | |
| 419 | + }); | |
| 420 | + | |
| 421 | + | |
| 422 | + console.log("goodsJump", item); | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + this.$parent.gotoDetail(item); | |
| 427 | + } | |
| 428 | + }, | |
| 429 | + | |
| 430 | + /** | |
| 431 | + * 点击跳转商品购买 | |
| 432 | + * @param {object} item [数据对象] | |
| 433 | + */ | |
| 434 | + goodsPrimary(item) { | |
| 435 | + | |
| 436 | + // 判断并调用通用跳转 | |
| 437 | + if (typeof this.$parent.gotoDetail === "function") { | |
| 438 | + | |
| 439 | + // 临时,设置跳转商品详情参数 | |
| 440 | + Object.assign(item, { | |
| 441 | + type: "2", | |
| 442 | + to: item.id, | |
| 443 | + shop_type: "1" | |
| 444 | + }); | |
| 445 | + | |
| 446 | + | |
| 447 | + console.log("goodsPrimary", item); | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + this.$parent.gotoDetail(item); | |
| 452 | + } | |
| 453 | + } | |
| 454 | + }, | |
| 455 | + head: { | |
| 456 | + title () { | |
| 457 | + return { | |
| 458 | + inner: this.title | |
| 459 | + } | |
| 460 | + } | |
| 461 | + }, | |
| 462 | + watch: { | |
| 463 | + | |
| 464 | + // 设置页面标题 | |
| 465 | + title(newVal) { | |
| 466 | + if (this.$store.state.browser.toLowerCase() == "qq" && this.$store.state.deviceType.toLowerCase() == "iphone") { | |
| 467 | + this.$iFrame.insertIFrame(newVal); | |
| 468 | + } else { | |
| 469 | + this.$emit("updateHead"); | |
| 470 | + } | |
| 471 | + } | |
| 472 | + } | |
| 473 | + } | |
| 474 | +</script> | |
| 475 | + | |
| 476 | +<!-- Add "scoped" attribute to limit CSS to this component only --> | |
| 477 | +<style rel="stylesheet/less" lang="less" scoped> | |
| 478 | + @import "newDaren"; | |
| 479 | +</style> | ... | ... |
src/pages/notYetOpened/notYetOpened.less
0 → 100644
| 1 | +.not_yet_opened{ | |
| 2 | + height: 100vh; | |
| 3 | + display: flex; | |
| 4 | + align-items: center; | |
| 5 | + .box{ | |
| 6 | + text-align: center; | |
| 7 | + margin: 0 auto; | |
| 8 | + img{ | |
| 9 | + width: 130px; | |
| 10 | + height: 130px; | |
| 11 | + } | |
| 12 | + .title{ | |
| 13 | + height:40px; | |
| 14 | + font-size:28px; | |
| 15 | + font-weight:400; | |
| 16 | + color:rgba(102,102,102,1); | |
| 17 | + line-height:40px; | |
| 18 | + margin-top: 10px; | |
| 19 | + } | |
| 20 | + .desc{ | |
| 21 | + width:500px; | |
| 22 | + font-size:24px; | |
| 23 | + font-weight:400; | |
| 24 | + color:rgba(180,180,180,1); | |
| 25 | + line-height:33px; | |
| 26 | + margin: 10px 0 30px 0; | |
| 27 | + } | |
| 28 | + .copy{ | |
| 29 | + font-size: 26px; | |
| 30 | + margin: auto; | |
| 31 | + width:140px; | |
| 32 | + height:48px; | |
| 33 | + line-height: 48px; | |
| 34 | + border-radius:26px; | |
| 35 | + border:1px solid rgba(97,196,100,1); | |
| 36 | + font-weight:400; | |
| 37 | + color:rgba(97,196,100,1); | |
| 38 | + } | |
| 39 | + } | |
| 40 | +} | ... | ... |
src/pages/notYetOpened/notYetOpened.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <div class="not_yet_opened"> | |
| 3 | + <div class="box"> | |
| 4 | + <img src="static/img/Computer.png" alt=""/> | |
| 5 | + <div class="title"> | |
| 6 | + 商城/餐厅入驻手机端尚未开通 | |
| 7 | + </div> | |
| 8 | + <div class="desc"> | |
| 9 | + 请前往网家家电商平台进行入驻申请,网址: <span :title="teamLink" class="invitLink pull-left ellipsis" v-text="teamLink" ></span> | |
| 10 | + </div> | |
| 11 | + <div class="copy" type="primary" v-clipboard:error="onError" | |
| 12 | + v-clipboard:copy="teamLink" v-clipboard:success="onCopy"> | |
| 13 | + 复制链接 | |
| 14 | + </div> | |
| 15 | + </div> | |
| 16 | + </div> | |
| 17 | +</template> | |
| 18 | + | |
| 19 | +<script> | |
| 20 | + // 引入组件 | |
| 21 | + import { Toast } from "mint-ui"; | |
| 22 | + export default { | |
| 23 | + name: 'notYetOpened', | |
| 24 | + data () { | |
| 25 | + return { | |
| 26 | + teamLink:'http://seller.mall.cnlive.com' | |
| 27 | + } | |
| 28 | + }, | |
| 29 | + created(){ | |
| 30 | + document.title = "尚未开通" | |
| 31 | + }, | |
| 32 | + methods: { | |
| 33 | + // 复制成功 | |
| 34 | + onCopy(e){ | |
| 35 | + Toast('复制成功'); | |
| 36 | + }, | |
| 37 | + // 复制失败 | |
| 38 | + onError(e){ | |
| 39 | + Toast('复制失败'); | |
| 40 | + }, | |
| 41 | + } | |
| 42 | + } | |
| 43 | +</script> | |
| 44 | + | |
| 45 | +<!-- Add "scoped" attribute to limit CSS to this component only --> | |
| 46 | +<style rel="stylesheet/less" lang="less" scoped> | |
| 47 | + @import "NotYetOpened"; | |
| 48 | +</style> | ... | ... |
src/pages/recommendMore/recommendMore.less
0 → 100644
| 1 | +.fans-shop-message-list-box { | |
| 2 | + /deep/ .van-pull-refresh { | |
| 3 | + .van-pull-refresh__track { | |
| 4 | + .van-pull-refresh__head { | |
| 5 | + font-size: 30px; | |
| 6 | + } | |
| 7 | + } | |
| 8 | + } | |
| 9 | + .title{ | |
| 10 | + margin: 30px; | |
| 11 | + height:50px; | |
| 12 | + font-size:36px; | |
| 13 | + font-weight:600; | |
| 14 | + color:rgba(74,74,74,1); | |
| 15 | + line-height:50px; | |
| 16 | + } | |
| 17 | + .item_box{ | |
| 18 | + height: calc(100vh-110px); | |
| 19 | + width: 100%; | |
| 20 | + overflow-y: auto; | |
| 21 | + } | |
| 22 | +} | ... | ... |
src/pages/recommendMore/recommendMore.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <div class="fans-shop-message-list-box"> | |
| 3 | + | |
| 4 | + <!-- nav --> | |
| 5 | + <back-box :style="'padding-top: ' + ($parent.top.value) + 'px'" @back="back" | |
| 6 | + :backs="backs"> | |
| 7 | + </back-box> | |
| 8 | + | |
| 9 | + <!-- 下拉刷新 --> | |
| 10 | + <!-- <van-pull-refresh v-model="isLoading" pulling-text="下拉刷新..." loosing-text="释放刷新" loading-text="加载中..." success-text="刷新成功" @refresh="onRefresh"> --> | |
| 11 | + | |
| 12 | + <!-- 已关注达人列表 --> | |
| 13 | + <div class="item_box"> | |
| 14 | + <div | |
| 15 | + infinite-scroll-immediate-check="true" | |
| 16 | + v-infinite-scroll="recommendMore" | |
| 17 | + infinite-scroll-disabled="loading" | |
| 18 | + :infinite-scroll-distance="50"> | |
| 19 | + <!-- 达人列表组件 --> | |
| 20 | + <dresserList @fansShop="fansShop" @toDetail="toDetail" | |
| 21 | + :dresserList="list"> | |
| 22 | + </dresserList> | |
| 23 | + </div> | |
| 24 | + </div> | |
| 25 | + <!-- </van-pull-refresh> --> | |
| 26 | + </div> | |
| 27 | +</template> | |
| 28 | + | |
| 29 | +<script> | |
| 30 | + // 引入组件 | |
| 31 | + import { Toast, Indicator } from 'mint-ui'; | |
| 32 | + import backBox from "@/components/backBox/backBox"; | |
| 33 | + import dresserList from "@/components/dresserList/dresserList"; | |
| 34 | + | |
| 35 | + export default { | |
| 36 | + name: 'fansShopMessageList', | |
| 37 | + data() { | |
| 38 | + return { | |
| 39 | + title: "", | |
| 40 | + backs: { // nav导航条数据 | |
| 41 | + title: "推荐达人", | |
| 42 | + funcs: { | |
| 43 | + back: { | |
| 44 | + icon: "static/img/icon_back.png" | |
| 45 | + } | |
| 46 | + } | |
| 47 | + }, | |
| 48 | + list: null, // 达人列表 | |
| 49 | + loading: false, // 上拉加载控制 | |
| 50 | + pages:0, // 分页 | |
| 51 | + } | |
| 52 | + }, | |
| 53 | + components: { | |
| 54 | + backBox, | |
| 55 | + dresserList | |
| 56 | + }, | |
| 57 | + created() { | |
| 58 | + | |
| 59 | + // 设置标题 | |
| 60 | + this.$set(this, "title", "推荐达人页"); | |
| 61 | + document.title = "推荐达人页" | |
| 62 | + // 获取更多的推荐达人 | |
| 63 | + this.recommendMore(); | |
| 64 | + }, | |
| 65 | + methods: { | |
| 66 | + | |
| 67 | + // 下拉刷新 | |
| 68 | + // onRefresh() { | |
| 69 | + | |
| 70 | + // // 下拉刷新中 | |
| 71 | + // this.$set(this, "isLoading", true); | |
| 72 | + | |
| 73 | + // // 获取关注人列表 | |
| 74 | + // this.fansShopMessageList(); | |
| 75 | + // }, | |
| 76 | + | |
| 77 | + /** | |
| 78 | + * 已关注达人列表 | |
| 79 | + */ | |
| 80 | + recommendMore () { | |
| 81 | + | |
| 82 | + // 校验登录 | |
| 83 | + if (this.$parent.checkLogin()) { | |
| 84 | + this.loading = true; | |
| 85 | + this.pages++ | |
| 86 | + // 加载中提示 | |
| 87 | + Indicator.open("加载中..."); | |
| 88 | + | |
| 89 | + // 请求接口 | |
| 90 | + this.http("/Api/" + this.getApiVersion().dynamic + "/hotDarenList", { | |
| 91 | + uid: this.getStore("uid"), | |
| 92 | + page: this.pages | |
| 93 | + },this.recommendMoreCallback, { | |
| 94 | + method: "post" | |
| 95 | + }); | |
| 96 | + } | |
| 97 | + }, | |
| 98 | + | |
| 99 | + /** | |
| 100 | + * 已关注达人列表回调 | |
| 101 | + * @param {object} res [服务器返回数据] | |
| 102 | + * @param {object} ext [扩展参数] | |
| 103 | + */ | |
| 104 | + recommendMoreCallback(res, ext) { | |
| 105 | + | |
| 106 | + // 加载完成 | |
| 107 | + Indicator.close(); | |
| 108 | + | |
| 109 | + // 下拉刷新结束 | |
| 110 | + this.$set(this, "isLoading", false); | |
| 111 | + | |
| 112 | + // 返回处理 | |
| 113 | + if (res.code == 200) { | |
| 114 | + | |
| 115 | + // 解构数据 | |
| 116 | + let {data: datas} = res; | |
| 117 | + | |
| 118 | + /*获取裂变数据*/ | |
| 119 | + if (datas.list && datas.list.length) { | |
| 120 | + // 隐藏加载圈 | |
| 121 | + this.loading = false; | |
| 122 | + if(this.pages>1){ | |
| 123 | + this.$set(this, "list",[...this.list,...datas.list]); | |
| 124 | + }else { | |
| 125 | + this.$set(this, "list",datas.list); | |
| 126 | + } | |
| 127 | + | |
| 128 | + } | |
| 129 | + } | |
| 130 | + }, | |
| 131 | + /** | |
| 132 | + * 关注/取消关注达人 | |
| 133 | + */ | |
| 134 | + fansShop(item) { | |
| 135 | + Indicator.open("加载中..."); | |
| 136 | + // 判断必要参数 | |
| 137 | + if (item.id && this.$route.query.uid) { | |
| 138 | + // 请求接口 | |
| 139 | + this.http("/Api/" + this.getApiVersion().dynamic + "/fansShop", { | |
| 140 | + id: item.id || 0, | |
| 141 | + uid: this.getStore("uid") || 0 | |
| 142 | + }, this.fansShopCallback, { | |
| 143 | + method: "post", | |
| 144 | + item | |
| 145 | + } | |
| 146 | + ); | |
| 147 | + } | |
| 148 | + }, | |
| 149 | + | |
| 150 | + /** | |
| 151 | + * 关注/取消关注达人回调 | |
| 152 | + * @param {object} res [服务器返回数据] | |
| 153 | + * @param {object} ext [扩展参数] | |
| 154 | + */ | |
| 155 | + fansShopCallback(res, ext) { | |
| 156 | + | |
| 157 | + // 加载完成 | |
| 158 | + Indicator.close(); | |
| 159 | + if (res.code) { | |
| 160 | + // 设置已关注 | |
| 161 | + if (ext.item.is_fans == "0") { | |
| 162 | + // 关注达人 | |
| 163 | + this.$set(ext.item, "is_fans", "1"); | |
| 164 | + }else{ | |
| 165 | + // 取消关注达人 | |
| 166 | + this.$set(ext.item, "is_fans", "0"); | |
| 167 | + } | |
| 168 | + }else if (res.statusCode === 200 && res.data.code == 400) { | |
| 169 | + | |
| 170 | + // 关注失败 | |
| 171 | + this.showToast(res.data.message); | |
| 172 | + } else { | |
| 173 | + | |
| 174 | + // 关注失败 | |
| 175 | + this.showToast("关注失败"); | |
| 176 | + } | |
| 177 | + }, | |
| 178 | + /** | |
| 179 | + * 通用跳转 | |
| 180 | + * @param {object} item [数据对象] | |
| 181 | + */ | |
| 182 | + toDetail(item) { | |
| 183 | + // 判断并调用通用跳转 | |
| 184 | + if (typeof this.$parent.gotoDetail === "function") { | |
| 185 | + | |
| 186 | + // 临时,设置跳转达人个人主页用户数据 | |
| 187 | + Object.assign(item, { | |
| 188 | + type: "5", | |
| 189 | + to: (this.mode == "prod") ? "https://managemall.cnlive.com/html/preferred-library/1/#/pages/darenProfile/darenProfile?from=redirect" + "&id=" + item.id + "&uid=" + this.getStore("uid") | |
| 190 | + : "https://wjjshop.cnlive.com/html/preferred-library/1/#/pages/darenProfile/darenProfile?from=redirect"+ "&id=" + item.id + "&uid=" + this.getStore("uid"), | |
| 191 | + shop_type: "" | |
| 192 | + }); | |
| 193 | + | |
| 194 | + | |
| 195 | + console.log("userJump", item); | |
| 196 | + | |
| 197 | + this.$parent.gotoDetail(item); | |
| 198 | + } | |
| 199 | + }, | |
| 200 | + | |
| 201 | + /** | |
| 202 | + * 后退 | |
| 203 | + */ | |
| 204 | + back() { | |
| 205 | + | |
| 206 | + // 判断是否有后退函数 | |
| 207 | + if (typeof this.$parent.back === "function") { | |
| 208 | + | |
| 209 | + // 调用后退 | |
| 210 | + this.$parent.back(); | |
| 211 | + } else { | |
| 212 | + | |
| 213 | + // 后退 | |
| 214 | + window.history.go(-1); | |
| 215 | + } | |
| 216 | + } | |
| 217 | + }, | |
| 218 | + head: { | |
| 219 | + title () { | |
| 220 | + return { | |
| 221 | + inner: this.title | |
| 222 | + } | |
| 223 | + } | |
| 224 | + }, | |
| 225 | + watch: { | |
| 226 | + | |
| 227 | + // 设置页面标题 | |
| 228 | + title(newVal) { | |
| 229 | + if (this.$store.state.browser.toLowerCase() == "qq" && this.$store.state.deviceType.toLowerCase() == "iphone") { | |
| 230 | + this.$iFrame.insertIFrame(newVal); | |
| 231 | + } else { | |
| 232 | + this.$emit("updateHead"); | |
| 233 | + } | |
| 234 | + } | |
| 235 | + } | |
| 236 | + } | |
| 237 | +</script> | |
| 238 | + | |
| 239 | +<!-- Add "scoped" attribute to limit CSS to this component only --> | |
| 240 | +<style rel="stylesheet/less" lang="less" scoped> | |
| 241 | + @import "recommendMore"; | |
| 242 | +</style> | ... | ... |
src/router/index.js
| ... | ... | @@ -92,6 +92,72 @@ const router = new Router({ |
| 92 | 92 | meta: { |
| 93 | 93 | requireAuth: false |
| 94 | 94 | } |
| 95 | + }, | |
| 96 | + { | |
| 97 | + // 优选库环球优物更多列表页 | |
| 98 | + path: "/darenList", | |
| 99 | + name: "darenList", | |
| 100 | + component: resolve => { | |
| 101 | + require(["@/pages/darenList/darenList"], resolve); | |
| 102 | + }, | |
| 103 | + meta: { | |
| 104 | + requireAuth: false | |
| 105 | + } | |
| 106 | + }, | |
| 107 | + { | |
| 108 | + // 新达人页面 | |
| 109 | + path: "/newDaren", | |
| 110 | + name: "newDaren", | |
| 111 | + component: resolve => { | |
| 112 | + require(["@/pages/newDaren/newDaren"], resolve); | |
| 113 | + }, | |
| 114 | + meta: { | |
| 115 | + requireAuth: false | |
| 116 | + } | |
| 117 | + }, | |
| 118 | + { | |
| 119 | + // 关注达人更多动态页 | |
| 120 | + path: "/moreDynamic", | |
| 121 | + name: "moreDynamic", | |
| 122 | + component: resolve => { | |
| 123 | + require(["@/pages/moreDynamic/moreDynamic"], resolve); | |
| 124 | + }, | |
| 125 | + meta: { | |
| 126 | + requireAuth: false | |
| 127 | + } | |
| 128 | + }, | |
| 129 | + { | |
| 130 | + // 达人推荐更多页 | |
| 131 | + path: "/recommendMore", | |
| 132 | + name: "recommendMore", | |
| 133 | + component: resolve => { | |
| 134 | + require(["@/pages/recommendMore/recommendMore"], resolve); | |
| 135 | + }, | |
| 136 | + meta: { | |
| 137 | + requireAuth: false | |
| 138 | + } | |
| 139 | + }, | |
| 140 | + { | |
| 141 | + // 我的礼盒 | |
| 142 | + path: "/myGiftBox", | |
| 143 | + name: "myGiftBox", | |
| 144 | + component: resolve => { | |
| 145 | + require(["@/pages/myGiftBox/myGiftBox"], resolve); | |
| 146 | + }, | |
| 147 | + meta: { | |
| 148 | + requireAuth: false | |
| 149 | + } | |
| 150 | + }, | |
| 151 | + { | |
| 152 | + // 暂未开通 | |
| 153 | + path: "/notYetOpened", | |
| 154 | + name: "notYetOpened", | |
| 155 | + component: resolve => { | |
| 156 | + require(["@/pages/notYetOpened/notYetOpened"], resolve); | |
| 157 | + }, | |
| 158 | + meta: { | |
| 159 | + requireAuth: false | |
| 160 | + } | |
| 95 | 161 | } |
| 96 | 162 | ] |
| 97 | 163 | }, |
| ... | ... | @@ -99,7 +165,6 @@ const router = new Router({ |
| 99 | 165 | path: "*", |
| 100 | 166 | redirect: "/mall" |
| 101 | 167 | } |
| 102 | - | |
| 103 | 168 | ] |
| 104 | 169 | }); |
| 105 | 170 | ... | ... |
static/img/Computer.png
0 → 100644
4.78 KB
static/img/icon_daren_list_active.png
0 → 100644
558 Bytes
static/img/icon_popular_comment.png
0 → 100644
2.98 KB
static/img/play.png
0 → 100755
2.91 KB
static/img/spot.png
0 → 100644
568 Bytes
static/img/spot_active.png
0 → 100644
912 Bytes