邓雄飞 4 years ago
parent
commit
0a8c5da7f2
3 changed files with 578 additions and 549 deletions
  1. 1088
      pages/cart/index.vue
  2. 9
      pages/mine/index.vue
  3. 30
      pages/store/index.vue

1088
pages/cart/index.vue
File diff suppressed because it is too large
View File

9
pages/mine/index.vue

@ -27,7 +27,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="logout" @click="logout">
<view v-if="hasLogin" class="logout" @click="logout">
<text class="text">退出登录</text> <text class="text">退出登录</text>
<image class="icon" src="/static/imgs/mine/logout-icon.png"></image> <image class="icon" src="/static/imgs/mine/logout-icon.png"></image>
</view> </view>
@ -96,7 +96,7 @@
<text style="font-size: 30rpx; color: rgba(0, 0, 0, 0.85); font-weight: 600">其他工具</text> <text style="font-size: 30rpx; color: rgba(0, 0, 0, 0.85); font-weight: 600">其他工具</text>
</view> </view>
<view class="icon-area"> <view class="icon-area">
<view class="icon-item" style="margin-right: 64rpx" @click="go2('account-management')">
<view class="icon-item" style="margin-right: 64rpx" @click="loginGo2('account-management')">
<image class="icon" src="/static/imgs/mine/account-icon.png"></image> <image class="icon" src="/static/imgs/mine/account-icon.png"></image>
<text class="label">账号管理</text> <text class="label">账号管理</text>
</view> </view>
@ -105,13 +105,11 @@
<text class="label">我的询价</text> <text class="label">我的询价</text>
</view> </view>
<view class="icon-item" style="margin-right: 64rpx" @click="loginGo2('address-manage')"> <view class="icon-item" style="margin-right: 64rpx" @click="loginGo2('address-manage')">
<image class="icon" src="/static/imgs/mine/address-icon.png" @click="go2('address-manage')"></image>
<image class="icon" src="/static/imgs/mine/address-icon.png"></image>
<text class="label">收货地址</text> <text class="label">收货地址</text>
</view> </view>
</view> </view>
</view> </view>
<view @click="loginGo2('test')">test</view>
<view @click="loginGo2('order-detail')">order-detail</view>
<view @click="loginGo2('enterprise-info')">enterprise-info</view> <view @click="loginGo2('enterprise-info')">enterprise-info</view>
</view> </view>
</template> </template>
@ -217,6 +215,7 @@ export default {
} }
}) })
this.hasLogin && getBaseInfo({}, true) this.hasLogin && getBaseInfo({}, true)
!this.hasLogin && (this.fsInfo.status = -1)
} }
} }
</script> </script>

30
pages/store/index.vue

@ -1,6 +1,6 @@
<template> <template>
<view class="warpper">
<uni-nav-bar statusBar fixed title="店铺首页"></uni-nav-bar>
<view class="wrapper">
<uni-nav-bar statusBar fixed title="店铺首页"></uni-nav-bar>
<view class="top-box"> <view class="top-box">
<view class=""> <view class="">
<!-- <image class="image" src="https://qncloud.oss-cn-shenzhen.aliyuncs.com/paper_shopkeeper/paper-default-small.png" mode=""></image> --> <!-- <image class="image" src="https://qncloud.oss-cn-shenzhen.aliyuncs.com/paper_shopkeeper/paper-default-small.png" mode=""></image> -->
@ -50,7 +50,7 @@
</view> </view>
<view class="footer"> <view class="footer">
<view class="left"> <view class="left">
<text class="price">{{ item.priceRange }}</text>
<text :class="{ price: true, 'price-single': hasLogin, 'price-range': !hasLogin }">{{ transformPrice(item.priceRange) }}</text>
<!-- <text class="unit">/</text> --> <!-- <text class="unit">/</text> -->
</view> </view>
<view class="btn">马上抢</view> <view class="btn">马上抢</view>
@ -157,13 +157,28 @@ export default {
this.params.name = value this.params.name = value
this.pagination.pageNum = 1 this.pagination.pageNum = 1
this.getList() this.getList()
},
transformPrice(value) {
if (this.hasLogin) {
return `¥${value}`
} else {
return `¥${value - 150}${value - 0 + 400}`
}
}
},
onShow() {
this.downCallback()
},
computed: {
hasLogin() {
return this.$store.state.qnToken != ''
} }
} }
} }
</script> </script>
<style lang="scss"> <style lang="scss">
.warpper {
.wrapper {
.header { .header {
justify-content: space-between; justify-content: space-between;
.header-title { .header-title {
@ -314,11 +329,16 @@ export default {
flex-shrink: 1; flex-shrink: 1;
} }
.price { .price {
font-size: 34rpx;
color: #f5222d; color: #f5222d;
letter-spacing: 0; letter-spacing: 0;
font-weight: 600; font-weight: 600;
} }
.price-single {
font-size: 34rpx;
}
.price-range {
font-size: 24rpx;
}
.unit { .unit {
font-size: 24rpx; font-size: 24rpx;
color: #f5222d; color: #f5222d;

Loading…
Cancel
Save