diff --git a/components/product/productItem.vue b/components/product/productItem.vue index 65afa25..f3da87d 100644 --- a/components/product/productItem.vue +++ b/components/product/productItem.vue @@ -1,22 +1,19 @@ @@ -55,12 +61,16 @@ return { productDetail : { image : 'https://cdn.uviewui.com/uview/swiper/swiper3.png,https://cdn.uviewui.com/uview/swiper/swiper2.png', - content : '', - } + details : '', + }, + id : 0, } }, onLoad(args) { - console.log(args); + this.id = args.id + }, + onShow() { + this.getRiceProductDetail() }, methods: { // 分享商品 @@ -70,7 +80,17 @@ // 选择完成规格立即租赁下单 submit(){ - } + }, + // 获取商品 + getRiceProductDetail(){ + this.$api('getRiceProductDetail', { + id : this.id + }, res => { + if(res.code == 200){ + this.productDetail = res.result + } + }) + }, } } @@ -100,10 +120,12 @@ color: #999; text-align: right; text-decoration: line-through; + margin-top: 14rpx; } .desc{ font-size: 26rpx; color: #777; + margin-top: 20rpx; } } .info-unit{ diff --git a/pages_order/static/address/icon1.png b/pages_order/static/address/icon1.png new file mode 100644 index 0000000..4d52c10 Binary files /dev/null and b/pages_order/static/address/icon1.png differ diff --git a/store/store.js b/store/store.js index bcace15..52d26fc 100644 --- a/store/store.js +++ b/store/store.js @@ -74,6 +74,22 @@ const store = new Vuex.Store({ } }) }, + // 退出登录 + logout(state){ + uni.showModal({ + title: '确认退出登录吗', + success(r) { + if(r.confirm){ + state.userInfo = {} + state.role = false + uni.removeStorageSync('token') + uni.reLaunch({ + url: '/pages/index/index' + }) + } + } + }) + }, }, actions: {}, }) diff --git a/uni.scss b/uni.scss index 59369be..1b92e86 100644 --- a/uni.scss +++ b/uni.scss @@ -74,3 +74,23 @@ $uni-color-subtitle: #555555; // 二级标题颜色 $uni-font-size-subtitle:26px; $uni-color-paragraph: #3F536E; // 文章段落颜色 $uni-font-size-paragraph:15px; + + +.uni-color-btn{ + border-radius: 40rpx; + padding: 20rpx; + margin: 40rpx; + background: $uni-color; + color: #fff; + text-align: center; + font-size: 28rpx; +} +.uni-uncolor-btn{ + border-radius: 40rpx; + padding: 20rpx; + margin: 40rpx; + border: 1px solid $uni-color; + color: $uni-color; + text-align: center; + font-size: 28rpx; +} \ No newline at end of file