Commit 2c9cb7197aaabf3558680c445d3802099a09f499

Authored by zhiyangdu
1 parent 3bd8fc9e

商品订单跳转

src/components/receivingGiftsItem/receivingGiftsItem.less
... ... @@ -124,8 +124,8 @@
124 124 .img {
125 125 width: 16px;
126 126 height: 16px;
127   - background: url("../../../static/img/spot.png") no-repeat
128   - top;
  127 + background: url("../../../static/img/spot.png")
  128 + no-repeat top;
129 129 background-size: 100%;
130 130 }
131 131 .line_box {
... ... @@ -194,6 +194,28 @@
194 194 color: rgba(51, 51, 51, 1);
195 195 line-height: 40px;
196 196 }
  197 + .oredr_link_box {
  198 + display: flex;
  199 + width: 158px;
  200 + height: 52px;
  201 + background: rgba(208, 2, 27, 1);
  202 + border-radius: 100px 0px 0px 100px;
  203 + font-size: 26px;
  204 + font-weight: 500;
  205 + color: rgba(255, 255, 255, 1);
  206 + line-height: 52px;
  207 + position: fixed;
  208 + right:0;
  209 + z-index: 1000;
  210 + div{
  211 + margin-left: 18px;
  212 + }
  213 + .icon{
  214 + width: 20px;
  215 + height: 20px;
  216 + margin: 13px 0;
  217 + }
  218 + }
197 219 }
198 220 .noGift {
199 221 height: calc(100vh-364px);
... ... @@ -217,8 +239,8 @@
217 239 height: 230px;
218 240 }
219 241 }
220   - .box2{
221   - img{
  242 + .box2 {
  243 + img {
222 244 width: 200px;
223 245 height: 200px;
224 246 display: block;
... ...
src/components/receivingGiftsItem/receivingGiftsItem.vue
... ... @@ -164,11 +164,21 @@
164 164 </div>
165 165 <!-- 显示文字 -->
166 166 <div class="text_tip" v-else>完成</div>
  167 + <!-- 商品订单按钮 -->
  168 + <div
  169 + @click="OrderLink"
  170 + v-if="index == 0"
  171 + class="oredr_link_box"
  172 + :style="'top: ' + ($parent.$parent.top.value + 151) + 'px'"
  173 + >
  174 + <div>商品订单</div>
  175 + <van-icon class="icon" name="arrow" />
  176 + </div>
167 177 </div>
168 178 </div>
169 179 <!-- 您还未收到过礼物哦~-->
170 180 <div v-else class="noGift">
171   - <div v-if="isData==0" class="box">
  181 + <div v-if="isData == 0" class="box">
172 182 <img src="static/img/noGifts.png" />
173 183 <div class="tip">您还未收到过该礼物哦</div>
174 184 </div>
... ... @@ -186,7 +196,7 @@ export default {
186 196 data() {
187 197 return {};
188 198 },
189   - props: ["receivingGiftsInfo","isData"],
  199 + props: ["receivingGiftsInfo", "isData"],
190 200 created() {},
191 201 methods: {
192 202 // 回赠礼物跳转到商城
... ... @@ -200,6 +210,10 @@ export default {
200 210 // 跳转到用户详情页
201 211 onUserInfo(item) {
202 212 this.$emit("onUserInfo", item);
  213 + },
  214 + // 跳转到商品订单
  215 + OrderLink() {
  216 + this.$emit("OrderLink");
203 217 }
204 218 }
205 219 };
... ...
src/main.js
... ... @@ -6,11 +6,12 @@ import VueHead from &quot;vue-head&quot;;
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, Image, ImagePreview, Tab, Tabs, ActionSheet} from "vant";
  9 +import { Rate, Popup, Lazyload, Search, PullRefresh, Picker, Image, ImagePreview, Tab, Tabs, ActionSheet, Icon} from "vant";
10 10 import App from "./App";
11 11 import IdCard from './common/IdCard';
12 12 import VueBus from 'vue-bus';
13   -import VueClipboard from 'vue-clipboard2'
  13 +import VueClipboard from 'vue-clipboard2';
  14 +Vue.use(Icon);
14 15 Vue.use(Vuex);
15 16 Vue.use(VueResource);
16 17 Vue.use(VueHead, { separator: " " });
... ...
src/pages/myGiftBox/myGiftBox.vue
... ... @@ -66,6 +66,7 @@
66 66 @onUserInfo="onUserInfo"
67 67 @giftInReturn="giftInReturn"
68 68 @onReceivingGifts="onReceivingGifts"
  69 + @OrderLink="OrderLink"
69 70 :receivingGiftsInfo="receivingGiftsInfo"
70 71 :isData="this.receivingGifts.isData"
71 72 ></receiving-gifts-item>
... ... @@ -558,6 +559,10 @@ export default {
558 559 this.$parent.gotoDetail(item);
559 560 }
560 561 },
  562 + // 送礼列表的商品订单跳转
  563 + OrderLink(){
  564 +
  565 + },
561 566 // 送礼商品跳转到详情页
562 567 onGiftGiving(item) {
563 568 // 判断并调用通用跳转
... ...