vip换购列表更改及部分拼团功能融合
This commit is contained in:
@@ -46,7 +46,7 @@ const request = (parameter, hideLoding = true) => {
|
|||||||
data: parameter.data || {},
|
data: parameter.data || {},
|
||||||
method: parameter.method || 'GET',
|
method: parameter.method || 'GET',
|
||||||
success: res => {
|
success: res => {
|
||||||
// console.log(res)
|
console.log(res)
|
||||||
if (res.header.Authorization) {
|
if (res.header.Authorization) {
|
||||||
updateToken('token', res.header.Authorization)
|
updateToken('token', res.header.Authorization)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,9 +44,23 @@ const dtPAY = (orderNo,password) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const collagePAY = (orderNo,password) => {
|
||||||
|
return request({
|
||||||
|
url: 'mall/pay/' + orderNo + '/collage/account',
|
||||||
|
method:'post',
|
||||||
|
data: {
|
||||||
|
type: 'app',
|
||||||
|
transfer_password:password
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export {
|
export {
|
||||||
wxPAY,
|
wxPAY,
|
||||||
alPAY,
|
alPAY,
|
||||||
dtPAY,
|
dtPAY,
|
||||||
payIndex,
|
payIndex,
|
||||||
|
collagePAY,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -62,6 +62,21 @@ const buy = data => {
|
|||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 拼团商品确认页面
|
||||||
|
const buyPin = data => {
|
||||||
|
return request({
|
||||||
|
url: 'mall/buy/collages',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 拼团商品确认下单
|
||||||
|
const collages = data => {
|
||||||
|
return request({
|
||||||
|
url: 'mall/buy/collages',
|
||||||
|
method: 'POST',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 商品下单
|
// 商品下单
|
||||||
const verify = data => {
|
const verify = data => {
|
||||||
@@ -79,6 +94,21 @@ const classify = id => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 拼团成功后展示页面
|
||||||
|
const repages = id => {
|
||||||
|
return request({
|
||||||
|
url: 'mall/collages/' + id + '/repages'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 商城所有分类
|
||||||
|
const categories = id => {
|
||||||
|
return request({
|
||||||
|
url: 'mall/categories/lists'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
export {
|
export {
|
||||||
mall,
|
mall,
|
||||||
goods,
|
goods,
|
||||||
@@ -87,6 +117,10 @@ export {
|
|||||||
shopsGoods,
|
shopsGoods,
|
||||||
lists,
|
lists,
|
||||||
buy,
|
buy,
|
||||||
|
buyPin,
|
||||||
verify,
|
verify,
|
||||||
classify
|
collages,
|
||||||
|
repages,
|
||||||
|
classify,
|
||||||
|
categories
|
||||||
}
|
}
|
||||||
|
|||||||
94
pages.json
94
pages.json
@@ -154,9 +154,21 @@
|
|||||||
"path": "pages/store/list",
|
"path": "pages/store/list",
|
||||||
"name": "StoreList",
|
"name": "StoreList",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "商品",
|
"navigationBarTitleText": "更多商品",
|
||||||
"navigationBarBackgroundColor": "#FFFFFF",
|
"navigationBarBackgroundColor": "#FFFFFF",
|
||||||
"enablePullDownRefresh": true
|
"enablePullDownRefresh": true,
|
||||||
|
"app-plus": {
|
||||||
|
"titleNView": {
|
||||||
|
"backgroundColor": "#fff",
|
||||||
|
"buttons": [{
|
||||||
|
"float": "right",
|
||||||
|
"text": "\ue603",
|
||||||
|
"fontSrc": "/static/iconfont.ttf",
|
||||||
|
"color": "#000",
|
||||||
|
"fontSize": "20px"
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -447,7 +459,7 @@
|
|||||||
"color": "#696969",
|
"color": "#696969",
|
||||||
"type": "none",
|
"type": "none",
|
||||||
"fontSrc": "/static/fonts/iconfont1.ttf",
|
"fontSrc": "/static/fonts/iconfont1.ttf",
|
||||||
"text": "\ue608" //小相机
|
"text": "\ue608"
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -520,16 +532,16 @@
|
|||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "公告详情",
|
"navigationBarTitleText": "公告详情",
|
||||||
"enablePullDownRefresh": false,
|
"enablePullDownRefresh": false,
|
||||||
"navigationBarBackgroundColor": "#FFFFFF",
|
"navigationBarBackgroundColor": "#FFFFFF",
|
||||||
"app-plus": {
|
"app-plus": {
|
||||||
"titleNView": {
|
"titleNView": {
|
||||||
"buttons": [{
|
"buttons": [{
|
||||||
"text": "分享",
|
"text": "分享",
|
||||||
"fontSize": "14",
|
"fontSize": "14",
|
||||||
"width": "60px",
|
"width": "60px",
|
||||||
"color": "#333"
|
"color": "#333"
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
@@ -543,40 +555,40 @@
|
|||||||
}
|
}
|
||||||
,{
|
,{
|
||||||
"path" : "pages/store/vip/index/index",
|
"path" : "pages/store/vip/index/index",
|
||||||
"style" :
|
"style" :
|
||||||
{
|
{
|
||||||
"navigationBarTitleText": "***店铺会员",
|
"navigationBarTitleText": "***店铺会员",
|
||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": false
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
,{
|
,{
|
||||||
"path" : "pages/user/my-card/my-card",
|
"path" : "pages/user/my-card/my-card",
|
||||||
"name": "MyCard",
|
"name": "MyCard",
|
||||||
"style" :
|
"style" :
|
||||||
{
|
{
|
||||||
"navigationBarTitleText": "我的卡券",
|
"navigationBarTitleText": "我的卡券",
|
||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": false
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
,{
|
,{
|
||||||
"path" : "pages/group-book/success/success",
|
"path" : "pages/group-book/success/success",
|
||||||
"style" :
|
"style" :
|
||||||
{
|
{
|
||||||
"navigationBarTitleText": "拼单更多",
|
"navigationBarTitleText": "拼单更多",
|
||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": false
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
,{
|
,{
|
||||||
"path" : "pages/store/vip-list/vip-list",
|
"path" : "pages/store/vip-list/vip-list",
|
||||||
"name": "VipList",
|
"name": "VipList",
|
||||||
"style" :
|
"style" :
|
||||||
{
|
{
|
||||||
"navigationBarTitleText": "VIP换购中心",
|
"navigationBarTitleText": "VIP换购中心",
|
||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"tabBar": {
|
"tabBar": {
|
||||||
@@ -617,14 +629,14 @@
|
|||||||
"easycom": {
|
"easycom": {
|
||||||
"^u-(.*)": "uview-ui/components/u-$1/u-$1.vue"
|
"^u-(.*)": "uview-ui/components/u-$1/u-$1.vue"
|
||||||
},
|
},
|
||||||
"condition" : { //模式配置,仅开发期间生效
|
"condition" : {
|
||||||
"current": 0, //当前激活的模式(list 的索引项)
|
"current": 0,
|
||||||
"list": [
|
"list": [
|
||||||
{
|
{
|
||||||
"name": "", //模式名称
|
"name": "",
|
||||||
"path": "", //启动页面,必选
|
"path": "",
|
||||||
"query": "" //启动参数,在页面的onLoad函数里面得到
|
"query": ""
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,41 +1,95 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="pinSuccess">
|
<view class="pinSuccess">
|
||||||
<view class="count-down">
|
<view class="count-down">
|
||||||
<u-count-down :time="30 * 60 * 60 * 1000" format="HH:mm:ss" autoStart millisecond />
|
<u-count-down ref="countDown" :time="downTime" format="HH:mm:ss" :autoStart="true" millisecond/>
|
||||||
</view>
|
</view>
|
||||||
<view class="title"> 还差 <span>1</span> 人,赶紧邀请好友来拼单吧 </view>
|
<view class="title"> 还差 <span>{{surplus}}</span> 人,赶紧邀请好友来拼单吧 </view>
|
||||||
<view class="btn invite"> 邀请好友拼单 </view>
|
<view class="btn invite"> 邀请好友拼单 </view>
|
||||||
<view class="btn index" @click="goIndex"> 去首页逛逛</view>
|
<view class="btn index" @click="goIndex"> 去首页逛逛</view>
|
||||||
<view class="goodInfo">
|
<view class="goodInfo">
|
||||||
<view class="avatars">
|
<view class="avatars">
|
||||||
<image class="avatar me" src="/static/book/333.png" mode="aspectFill" />
|
<block v-for="(item,index) in details" :key='index'>
|
||||||
<image class="wen pin" src="/static/book/wen.png" mode="aspectFill" />
|
<image class="avatar pin" :src="item.cover" mode="aspectFill" />
|
||||||
</view>
|
</block>
|
||||||
<view class="orderInfo">
|
<image class="wen" src="/static/book/wen.png" mode="aspectFill" />
|
||||||
订单详情
|
|
||||||
<view class="">
|
|
||||||
<view class="">
|
|
||||||
商品名称商品名称商品名称商品名称商品名称商品名称商品名称商品名称商品名称
|
|
||||||
</view>
|
|
||||||
<u-icon type="arrow-right" size="15" />
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
|
<block>
|
||||||
|
<view class="orderInfo">
|
||||||
|
<view class="left"> 订单详情 </view>
|
||||||
|
<view class="right" @click="goDetail">
|
||||||
|
<view class="right-title"> {{goodName}} </view>
|
||||||
|
<u-icon name="arrow-right" />
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="orderInfo">
|
||||||
|
<view class="left"> 拼单规则 </view>
|
||||||
|
<view class="right">
|
||||||
|
<view class="right-title">人满发货 · 人不满退款 · 只能拼一次 </view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</block>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import {
|
||||||
|
repages
|
||||||
|
} from '@/apis/interfaces/store.js'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
goodName: '',
|
||||||
|
details: [],
|
||||||
|
downTime: 0,
|
||||||
|
surplus: 1,
|
||||||
|
order: {}, // order 是{} 标识不是我的订单,否则就是我的订单可以跳转订单详情
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
onLoad() {
|
||||||
|
console.log(this.$Route.query.id)
|
||||||
|
repages(this.$Route.query.id).then(res => {
|
||||||
|
this.order = res.order
|
||||||
|
this.goodName = res.order.goods.name
|
||||||
|
this.downTime = res.share.down * 1000
|
||||||
|
this.surplus = res.share.surplus
|
||||||
|
this.details = res.share.details
|
||||||
|
}).catch(err => {
|
||||||
|
uni.showToast({
|
||||||
|
title: err.message,
|
||||||
|
icon: "none",
|
||||||
|
mask: true,
|
||||||
|
duration: 3000
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onHide() {
|
||||||
|
try {
|
||||||
|
if(this.$refs.countDown){
|
||||||
|
this.$refs.countDown.pause()
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
uni.showToast({
|
||||||
|
title: err,
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
goIndex() {
|
goIndex() {
|
||||||
uni.reLaunch({
|
uni.reLaunch({
|
||||||
url: '/pages/store/index/index'
|
url: '/pages/store/index'
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
goDetail(){
|
||||||
|
if(!this.order.order_no){
|
||||||
|
console.log('不是我的跳商品详情')
|
||||||
|
uni.navigateTo({
|
||||||
|
url:'/pages/store/goods?id='+this.order.goods.goods_id
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
console.log('是我的跳转订单详情')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -52,7 +106,7 @@
|
|||||||
.count-down {
|
.count-down {
|
||||||
background-color: #f9f9f9;
|
background-color: #f9f9f9;
|
||||||
border-radius: 4rpx;
|
border-radius: 4rpx;
|
||||||
padding: 10rpx $padding;
|
padding: 10rpx $padding;
|
||||||
margin-top: $margin;
|
margin-top: $margin;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -102,16 +156,16 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
position: relative;
|
position: relative;
|
||||||
border-bottom: solid 1rpx #999;
|
border-bottom: solid 1rpx #f9f9f9;
|
||||||
padding-bottom: $padding;
|
padding-bottom: $padding;
|
||||||
|
|
||||||
image {
|
image {
|
||||||
width: 90rpx;
|
width: 90rpx;
|
||||||
height: 90rpx;
|
height: 90rpx;
|
||||||
margin: 10rpx 20rpx;
|
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
|
margin: 10rpx 20rpx;
|
||||||
|
border: solid 2rpx #f9f9f9;
|
||||||
}
|
}
|
||||||
|
|
||||||
.me {
|
.me {
|
||||||
@@ -139,26 +193,44 @@
|
|||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
content: '拼主';
|
content: '拼主';
|
||||||
border-radius: 20rpx;
|
// border-radius: 20rpx;
|
||||||
background: orange;
|
background: orange;
|
||||||
padding: 4rpx 20rpx;
|
padding: 4rpx 0;
|
||||||
font-size: 24rpx;
|
font-size: 20rpx;
|
||||||
|
width: 100%;
|
||||||
|
text-align: center;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.orderInfo{
|
.orderInfo {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
padding: 30rpx 0;
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: #666;
|
||||||
|
border-bottom: solid 1rpx #f9f9f9;
|
||||||
|
|
||||||
|
.right {
|
||||||
|
flex: 1;
|
||||||
|
margin-left: $margin;
|
||||||
|
text-align: right;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: flex-end;
|
||||||
|
box-sizing: border-box;
|
||||||
|
|
||||||
|
.right-title {
|
||||||
|
margin-right: 10rpx;
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -6,17 +6,20 @@
|
|||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import payKeyboard from '@/components/mi-payKeyboard/mi-payKeyboard.vue'
|
import payKeyboard from '@/components/mi-payKeyboard/mi-payKeyboard.vue'
|
||||||
import eventBus from '../../utils/eventBus.js';
|
import eventBus from '../../utils/eventBus.js';
|
||||||
import {
|
import {
|
||||||
wxPAY,
|
wxPAY,
|
||||||
alPAY,
|
alPAY,
|
||||||
dtPAY,
|
dtPAY,
|
||||||
|
collagePAY,
|
||||||
payIndex
|
payIndex
|
||||||
} from '@/apis/interfaces/pay'
|
} from '@/apis/interfaces/pay'
|
||||||
export default {
|
export default {
|
||||||
components: { payKeyboard },
|
components: {
|
||||||
|
payKeyboard
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
payNo: "",
|
payNo: "",
|
||||||
@@ -26,8 +29,9 @@
|
|||||||
oepnType: '',
|
oepnType: '',
|
||||||
canpay: true,
|
canpay: true,
|
||||||
has_transfer_password: true,
|
has_transfer_password: true,
|
||||||
password: '',
|
password: '',
|
||||||
showKeyBoard: false,
|
showKeyBoard: false,
|
||||||
|
type: '',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@@ -36,7 +40,9 @@
|
|||||||
if (this.$Route.query.oepnType === 'order') {
|
if (this.$Route.query.oepnType === 'order') {
|
||||||
this.oepnType = this.$Route.query.oepnType
|
this.oepnType = this.$Route.query.oepnType
|
||||||
}
|
}
|
||||||
|
if (this.$Route.query.type) {
|
||||||
|
this.type = this.$Route.query.type
|
||||||
|
}
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
this.payIndex();
|
this.payIndex();
|
||||||
@@ -109,23 +115,27 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// 输入正确的回调
|
// 输入正确的回调
|
||||||
enterSuccess(password) {
|
enterSuccess(password) {
|
||||||
this.password = password
|
this.password = password
|
||||||
this.showKeyBoard = false
|
this.showKeyBoard = false
|
||||||
this.getDTPAY();
|
this.getDTPAY();
|
||||||
},
|
},
|
||||||
// 点击[取消] 关闭输入框 的回调
|
// 点击[取消] 关闭输入框 的回调
|
||||||
close(){
|
close() {
|
||||||
this.showKeyBoard = false;
|
this.showKeyBoard = false;
|
||||||
this.canpay = true;
|
this.canpay = true;
|
||||||
},
|
},
|
||||||
|
|
||||||
// 调用 dt 支付
|
// 调用 dt 支付
|
||||||
getDTPAY() {
|
getDTPAY() {
|
||||||
if (this.canpay) {
|
if (this.canpay) {
|
||||||
this.canpay = false
|
this.canpay = false
|
||||||
dtPAY(this.payNo, this.password).then(res => {
|
let requestUrl = dtPAY
|
||||||
|
if (this.type === 'pin') {
|
||||||
|
requestUrl = collagePAY
|
||||||
|
}
|
||||||
|
requestUrl(this.payNo, this.password).then(res => {
|
||||||
if (res.state === 'warning') {
|
if (res.state === 'warning') {
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: '当前DT积分不足',
|
title: '当前DT积分不足',
|
||||||
@@ -162,27 +172,64 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
uni.showModal({
|
if (this.type === 'pin') {
|
||||||
title: '支付成功',
|
console.log('pin........', res)
|
||||||
content: '该订单已支付成功',
|
this.canpay = true
|
||||||
confirmText: '我的订单',
|
if (res.detailId) {
|
||||||
confirmColor: "#34CE98",
|
uni.showLoading({
|
||||||
cancelText: '再逛逛',
|
title:'跳转中',
|
||||||
cancelColor: "#666666",
|
mask:true,
|
||||||
success: (res) => {
|
})
|
||||||
if (res.confirm) {
|
setTimeout(() => {
|
||||||
this.$Router.push({
|
uni.hideLoading()
|
||||||
name: "Order",
|
uni.navigateTo({
|
||||||
params: {
|
url: '/pages/group-book/success/success?id=' + res.detailId
|
||||||
index: 0
|
})
|
||||||
},
|
}, 2000)
|
||||||
})
|
|
||||||
} else {
|
} else {
|
||||||
uni.navigateBack();
|
uni.showModal({
|
||||||
}
|
title: '温馨提示',
|
||||||
this.canpay = true
|
content: '该订单拼团成功',
|
||||||
|
confirmText: '查看订单',
|
||||||
|
confirmColor: "#34CE98",
|
||||||
|
cancelText: '再逛逛',
|
||||||
|
cancelColor: "#666666",
|
||||||
|
success: (res) => {
|
||||||
|
if(res.confirm){
|
||||||
|
console.log('挑战到我的拼单列表')
|
||||||
|
} if(res.cancel){
|
||||||
|
uni.navigateTo({
|
||||||
|
url:'/pages/store/index'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
})
|
|
||||||
|
} else {
|
||||||
|
uni.showModal({
|
||||||
|
title: '支付成功',
|
||||||
|
content: '该订单已支付成功',
|
||||||
|
confirmText: '我的订单',
|
||||||
|
confirmColor: "#34CE98",
|
||||||
|
cancelText: '再逛逛',
|
||||||
|
cancelColor: "#666666",
|
||||||
|
success: (res) => {
|
||||||
|
if (res.confirm) {
|
||||||
|
this.$Router.push({
|
||||||
|
name: "Order",
|
||||||
|
params: {
|
||||||
|
index: 0
|
||||||
|
},
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
uni.navigateBack();
|
||||||
|
}
|
||||||
|
this.canpay = true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
<view class="block info-box">
|
<view class="block info-box">
|
||||||
<view class="info-item">
|
<view class="info-item">
|
||||||
<view class="label">购买数量</view>
|
<view class="label">购买数量</view>
|
||||||
<uni-number-box class="info-number" :value="qty" :min="1" :max="999" @change="numberChange" />
|
<uni-number-box class="info-number" :value="qty" :min="1" :max="limit" @change="numberChange" />
|
||||||
</view>
|
</view>
|
||||||
<view class="info-item">
|
<view class="info-item">
|
||||||
<view class="label">配送方式</view>
|
<view class="label">配送方式</view>
|
||||||
@@ -61,8 +61,10 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {
|
import {
|
||||||
buy,
|
buy,
|
||||||
verify
|
buyPin,
|
||||||
|
verify,
|
||||||
|
collages,
|
||||||
} from '@/apis/interfaces/store'
|
} from '@/apis/interfaces/store'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
@@ -73,38 +75,71 @@
|
|||||||
freight: 0,
|
freight: 0,
|
||||||
address: "",
|
address: "",
|
||||||
remark: "",
|
remark: "",
|
||||||
canApply: true
|
canApply: true,
|
||||||
|
limit:0,
|
||||||
|
type: '', // 是否为空
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
if (JSON.stringify(this.$store.getters.getAddress) !== '{}') this.address = this.$store.getters.getAddress
|
if (JSON.stringify(this.$store.getters.getAddress) !== '{}') this.address = this.$store.getters.getAddress
|
||||||
this.qty = this.$Route.query.qty;
|
this.qty = this.$Route.query.qty;
|
||||||
},
|
},
|
||||||
mounted() {
|
onLoad() {
|
||||||
|
if (this.$Route.query.type === 'pin') {
|
||||||
|
this.type = 'pin'
|
||||||
|
}
|
||||||
this.getBuy()
|
this.getBuy()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getBuy() {
|
getBuy() {
|
||||||
buy({
|
console.log(this.type === 'pin')
|
||||||
goods_sku_id: this.$Route.query.skuId,
|
if (this.type == 'pin') {
|
||||||
qty: this.qty
|
let data = {
|
||||||
}).then(res => {
|
goods_sku_id: this.$Route.query.skuId,
|
||||||
this.address = res.address
|
collage_id:this.$Route.query.collageid || '',
|
||||||
this.freight = res.freight
|
}
|
||||||
this.total = res.total
|
console.log(data);
|
||||||
this.goodsInfo = res.detail
|
buyPin(data).then(res => {
|
||||||
}).catch(err => {
|
this.address = res.address
|
||||||
uni.showModal({
|
this.freight = res.freight
|
||||||
title: '温馨提示',
|
this.total = res.total
|
||||||
content: err.message,
|
this.goodsInfo = res.detail
|
||||||
showCancel: false,
|
this.limit = res.limit
|
||||||
confirmColor: '#34CE98',
|
}).catch(err => {
|
||||||
cancelText: '知道了',
|
uni.showModal({
|
||||||
success: (res) => {
|
title: '温馨提示',
|
||||||
uni.navigateBack({ })
|
content: err.message,
|
||||||
}
|
showCancel: false,
|
||||||
|
confirmColor: '#34CE98',
|
||||||
|
cancelText: '知道了',
|
||||||
|
success: (res) => {
|
||||||
|
uni.navigateBack({})
|
||||||
|
}
|
||||||
|
})
|
||||||
})
|
})
|
||||||
})
|
} else {
|
||||||
|
buy({
|
||||||
|
goods_sku_id: this.$Route.query.skuId,
|
||||||
|
qty: this.qty
|
||||||
|
}).then(res => {
|
||||||
|
this.address = res.address
|
||||||
|
this.freight = res.freight
|
||||||
|
this.total = res.total
|
||||||
|
this.goodsInfo = res.detail
|
||||||
|
this.limit = res.limit
|
||||||
|
}).catch(err => {
|
||||||
|
uni.showModal({
|
||||||
|
title: '温馨提示',
|
||||||
|
content: err.message,
|
||||||
|
showCancel: false,
|
||||||
|
confirmColor: '#34CE98',
|
||||||
|
cancelText: '知道了',
|
||||||
|
success: (res) => {
|
||||||
|
uni.navigateBack({})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
},
|
},
|
||||||
numberChange(e) {
|
numberChange(e) {
|
||||||
this.qty = e
|
this.qty = e
|
||||||
@@ -129,56 +164,87 @@
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (this.canApply) {
|
if (this.canApply) {
|
||||||
this.canApply = false;
|
this.canApply = false;
|
||||||
verify({
|
if (this.type == 'pin'){
|
||||||
goods_sku_id: this.$Route.query.skuId,
|
collages({
|
||||||
qty: this.qty,
|
goods_sku_id: this.$Route.query.skuId,
|
||||||
address_id: this.address.address_id,
|
collage_id:this.$Route.query.collageid || '',
|
||||||
remark: this.remark || ''
|
address_id: this.address.address_id,
|
||||||
}).then(res => {
|
remark: this.remark || ''
|
||||||
console.log(res)
|
}).then(res => {
|
||||||
if (res.order_no === '') {
|
console.log(res)
|
||||||
uni.showModal({
|
this.$store.commit('setAddress', {})
|
||||||
title: ' 温馨提示',
|
this.$Router.replace({
|
||||||
content: '领取商品成功',
|
name: 'Pay',
|
||||||
confirmColor: '#34CE98',
|
params: {
|
||||||
confirmText: ' 查看订单',
|
orderNo: res.order_no,
|
||||||
cancelColor: '#999',
|
price: res.total,
|
||||||
cancelText: '返回首页',
|
coins: res.coins,
|
||||||
success: (res) => {
|
type:'pin'
|
||||||
if (res.confirm) {
|
}
|
||||||
uni.navigateTo({
|
})
|
||||||
url: '/pages/order/index?index=0'
|
this.canApply = true
|
||||||
})
|
}).catch(err => {
|
||||||
}
|
this.canApply = true
|
||||||
if (res.cancel) {
|
uni.showToast({
|
||||||
uni.reLaunch({
|
title: err.message,
|
||||||
url: '/pages/store/index'
|
icon: "none",
|
||||||
})
|
mask: true,
|
||||||
}
|
duration: 2000
|
||||||
}
|
})
|
||||||
})
|
})
|
||||||
} else {
|
}else{
|
||||||
this.$store.commit('setAddress', {})
|
verify({
|
||||||
this.$Router.replace({
|
goods_sku_id: this.$Route.query.skuId,
|
||||||
name: 'Pay',
|
qty: this.qty,
|
||||||
params: {
|
address_id: this.address.address_id,
|
||||||
orderNo: res.order_no,
|
remark: this.remark || ''
|
||||||
price: res.total,
|
}).then(res => {
|
||||||
coins: res.coins,
|
console.log(res)
|
||||||
}
|
if (res.order_no === '') {
|
||||||
})
|
uni.showModal({
|
||||||
}
|
title: ' 温馨提示',
|
||||||
this.canApply = true
|
content: '领取商品成功',
|
||||||
}).catch(err => {
|
confirmColor: '#34CE98',
|
||||||
this.canApply = true
|
confirmText: ' 查看订单',
|
||||||
uni.showToast({
|
cancelColor: '#999',
|
||||||
title: err.message,
|
cancelText: '返回首页',
|
||||||
icon: "none",
|
success: (res) => {
|
||||||
mask: true,
|
if (res.confirm) {
|
||||||
duration: 2000
|
uni.navigateTo({
|
||||||
})
|
url: '/pages/order/index?index=0'
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
if (res.cancel) {
|
||||||
|
uni.reLaunch({
|
||||||
|
url: '/pages/store/index'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.$store.commit('setAddress', {})
|
||||||
|
this.$Router.replace({
|
||||||
|
name: 'Pay',
|
||||||
|
params: {
|
||||||
|
orderNo: res.order_no,
|
||||||
|
price: res.total,
|
||||||
|
coins: res.coins,
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
this.canApply = true
|
||||||
|
}).catch(err => {
|
||||||
|
this.canApply = true
|
||||||
|
uni.showToast({
|
||||||
|
title: err.message,
|
||||||
|
icon: "none",
|
||||||
|
mask: true,
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
this.canApply = true
|
this.canApply = true
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,18 +9,18 @@
|
|||||||
</view>
|
</view>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper>
|
</swiper>
|
||||||
<view class="swiper-pages"> {{current}}/{{goods.pictures.length}}</view>
|
<view class="swiper-pages"> {{current}}/{{goods.pictures.length}}</view>
|
||||||
<view class="vipGoodsInfo" v-if="shop_vip.status" >{{shop_vip.message}} </view>
|
<view class="vipGoodsInfo" v-if="shop_vip.status" >{{shop_vip.message}} </view>
|
||||||
<view class="vipGoodsInfo" v-if="goods.is_active " >拼团商品</view>
|
<view class="vipGoodsInfo" v-if="goods.is_active " >拼团商品</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 详情 -->
|
<!-- 详情 -->
|
||||||
<view class="main">
|
<view class="main">
|
||||||
<view class="title"> {{goods.name}} </view>
|
<view class="title"> {{goods.name}} </view>
|
||||||
<view class="sub-title"><span class='vipType' v-if="shop_vip.messageTitle != ''">{{shop_vip.messageTitle}}</span>{{goods.description}}</view>
|
<view class="sub-title"><span class='vipType' v-if="shop_vip.messageTitle != ''">{{shop_vip.messageTitle}}</span>{{goods.description}}</view>
|
||||||
<view class="box-flex">
|
<view class="box-flex">
|
||||||
<view class="price">
|
<view class="price">
|
||||||
{{goods.price.show}}<text>DT积分</text>
|
{{goods.price.show}}<text>DT积分</text>
|
||||||
<span class ='del' v-if="shop_vip.status">{{goods.original_price}} DT积分</span>
|
<span class ='del' v-if="shop_vip.status">{{goods.original_price}} DT积分</span>
|
||||||
</view>
|
</view>
|
||||||
<view class="sales" v-if="goods.skus && !goods.is_active">库存量{{goods.skus[0].stock}}件</view>
|
<view class="sales" v-if="goods.skus && !goods.is_active">库存量{{goods.skus[0].stock}}件</view>
|
||||||
<view class="_pin" v-if="goods.is_active">
|
<view class="_pin" v-if="goods.is_active">
|
||||||
@@ -30,28 +30,44 @@
|
|||||||
<view class="tuan">{{goods.active.number}}人团</view>
|
<view class="tuan">{{goods.active.number}}人团</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<!-- vip 商品规格 -->
|
||||||
|
<view class="vipInfo" v-if="shop_vip.card">
|
||||||
|
<image src="/static/store/vip-line-bg.png" mode="widthFix" />
|
||||||
|
<view class="title">
|
||||||
|
{{shop_vip.card.name}}
|
||||||
|
<view class=" des"> {{shop_vip.card.description}} </view>
|
||||||
|
</view>
|
||||||
|
<view class="btn" @click="toVip">
|
||||||
|
<!-- 1 开通 2续费 3升级 number 类型 -->
|
||||||
|
查看详情
|
||||||
|
<!-- {{shop_vip.card.state === 1 ?'立即开通':shop_vip.card.state === 2 ?'立即续费':'立即升级'}} -->
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- 普通商品及 VIP 商品规格 -->
|
||||||
<view class="unit" v-if="goods.skus && goods.skus[0].unit !== '' && !goods.is_active" @click="open()">
|
<view class="unit" v-if="goods.skus && goods.skus[0].unit !== '' && !goods.is_active" @click="open()">
|
||||||
<span>规格:{{selectSkusValues.unit_text}}</span>
|
<span>规格:{{selectSkusValues.unit_text}}</span>
|
||||||
<uni-icons type="right" color="#cacaca" />
|
<uni-icons type="right" color="#cacaca" />
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 可拼团列表 -->
|
<!-- 可拼团列表 -->
|
||||||
<view class="is_active" v-if="goods.is_active && actives.length>0">
|
<view class="is_active" v-if="goods.is_active && collages.length>0">
|
||||||
<view class="title" v-if="actives.length > 2">
|
<view class="title" v-if="collages.length > 2">
|
||||||
这些人刚刚拼单成功,可参与拼单
|
这些人刚刚拼单成功,可参与拼单
|
||||||
<span @click="getMorePin = true">查看更多
|
<span @click="getMorePin = true">查看更多
|
||||||
<uni-icons type="right" color="#cacaca" />
|
<uni-icons type="right" color="#cacaca" />
|
||||||
</span>
|
</span>
|
||||||
</view>
|
</view>
|
||||||
<view class="title" v-if="actives.length <= 2"> {{actives.length}}人正在拼单,可参与拼单 </view>
|
<view class="title" v-if="collages.length <= 2"> {{collages.length}}人正在拼单,可参与拼单 </view>
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<block v-for="(item,index) in actives" :key="index">
|
<block v-for="(item,index) in collages" :key="index">
|
||||||
<view class="content-item" v-if="index < 2">
|
<view class="content-item" v-if="index < 2">
|
||||||
<view class="info">
|
<view class="info">
|
||||||
<u-avatar-group :urls="item.urls" size="34" gap="0.6" class="avatar-group" />
|
<u-avatar-group :urls="item.covers" size="34" gap="0.6" class="avatar-group" />
|
||||||
<view class="nickname"> {{item.name}}</view>
|
<view class="nickname"> {{item.names}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="btn" @click="toPin(item)">去拼单</view>
|
<view class="btn" v-if="goods.active.can_join || item.can_share" @click="toPin(item)">{{ item.can_share?'去分享':'去拼单'}}</view>
|
||||||
|
<view class="noneBtn" v-else @click="showPinToast">去拼单</view>
|
||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
</view>
|
</view>
|
||||||
@@ -75,7 +91,7 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 商品详情 -->
|
<!-- 商品详情 -->
|
||||||
<view class="imgs">
|
<view class="imgs">
|
||||||
<u-notice-bar v-if="shop_vip.status" text="戒指尺寸有大小,请再购买戒指时参照详情介绍备注所选尺寸" fontSize='14' />
|
<u-notice-bar v-if="shop_vip.status" text="戒指尺寸有大小,请再购买戒指时参照详情介绍备注所选尺寸" fontSize='14' />
|
||||||
<block v-for="(item, index) in goods.content" :key="index">
|
<block v-for="(item, index) in goods.content" :key="index">
|
||||||
<image :src="item" mode="widthFix" />
|
<image :src="item" mode="widthFix" />
|
||||||
@@ -85,14 +101,16 @@
|
|||||||
|
|
||||||
<!-- 立即购买 shop_vip.status 区分是否是 vip 商品 否则的就却分是拼团商品还是普通商品 -->
|
<!-- 立即购买 shop_vip.status 区分是否是 vip 商品 否则的就却分是拼团商品还是普通商品 -->
|
||||||
<view class="footer">
|
<view class="footer">
|
||||||
<view @click="toShop(goods.shop.shop_id)" class="shop">
|
<view @click="toShop(goods.shop.shop_id)" class="shop"> <uni-icons type="shop" size="26" color="grey" />店铺 </view>
|
||||||
<uni-icons type="shop" size="26" color="grey" />店铺
|
|
||||||
</view>
|
|
||||||
<!-- vip 规格弹窗立即领取 -->
|
<!-- vip 规格弹窗立即领取 -->
|
||||||
<button type="default" v-if="shop_vip.status" hover-class="none" @click="vipBuy">立即领取</button>
|
<button type="default" v-if="shop_vip.status" hover-class="none" @click="vipBuy">立即领取</button>
|
||||||
<!-- 非vip 规格弹窗 普通商品立即购买,拼单商品立即拼单 -->
|
<!-- 非vip 规格弹窗 普通商品立即购买,拼单商品立即拼单 -->
|
||||||
<block v-else>
|
<block v-else>
|
||||||
<button type="default" hover-class="none" @click="buy">立即购买</button>
|
<block v-if="goods.is_active">
|
||||||
|
<button type="default" v-if="goods.active.can_join" hover-class="none" @click="buy"> 立即拼单 </button>
|
||||||
|
<button type="default" v-else hover-class="none" @click="share"> 立即分享 </button>
|
||||||
|
</block>
|
||||||
|
<button v-else type="default" hover-class="none" @click="buy">立即购买</button>
|
||||||
</block>
|
</block>
|
||||||
</view>
|
</view>
|
||||||
<!-- 更多拼单弹窗 -->
|
<!-- 更多拼单弹窗 -->
|
||||||
@@ -100,13 +118,14 @@
|
|||||||
<view class="getPinTitle"> 可参与拼单 </view>
|
<view class="getPinTitle"> 可参与拼单 </view>
|
||||||
<scroll-view scroll-y="true" class="getPinList">
|
<scroll-view scroll-y="true" class="getPinList">
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<block v-for="(item,index) in actives" :key="index">
|
<block v-for="(item,index) in collages" :key="index">
|
||||||
<view class="content-item">
|
<view class="content-item">
|
||||||
<view class="info">
|
<view class="info">
|
||||||
<u-avatar-group :urls="item.urls" size="34" gap="0.6" class="avatar-group" />
|
<u-avatar-group :urls="item.covers" size="34" gap="0.6" class="avatar-group" />
|
||||||
<view class="nickname"> {{item.name}}</view>
|
<view class="nickname"> {{item.names}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="btn" @click="toPin(item)">去拼单</view>
|
<view class="btn" v-if="goods.active.can_join || item.can_share" @click="toPin(item)">{{ item.can_share?'去分享':'去拼单'}}</view>
|
||||||
|
<view class="noneBtn" v-else @click="showPinToast">去拼单</view>
|
||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
</view>
|
</view>
|
||||||
@@ -116,11 +135,11 @@
|
|||||||
<!-- 与谁谁的拼团 -->
|
<!-- 与谁谁的拼团 -->
|
||||||
<u-popup :show="pinShow" :round="10" mode="center" @close="close" :closeable='true' zIndex="1229930">
|
<u-popup :show="pinShow" :round="10" mode="center" @close="close" :closeable='true' zIndex="1229930">
|
||||||
<view scroll-y="true" class="content-2">
|
<view scroll-y="true" class="content-2">
|
||||||
<view class="title"> 参与张三的拼单 </view>
|
<view class="title"> 参与{{collageitem.names}}的拼单 </view>
|
||||||
<view class="number">仅剩<span>1</span>个名额</view>
|
<view class="number">仅剩<span>{{collageitem.surplus}}</span>个名额</view>
|
||||||
<view class="avatars">
|
<view class="avatars" v-for="(item,index) in collageitem.details" :key='index' >
|
||||||
<image class="avatar me" src="/static/book/333.png" mode="aspectFill" />
|
<image :class="['avatar',item.master?'pin':'']" :src="item.cover" mode="aspectFill" />
|
||||||
<image class="wen pin" src="/static/book/wen.png" mode="aspectFill" />
|
<image class="wen" src="/static/book/wen.png" mode="aspectFill" />
|
||||||
</view>
|
</view>
|
||||||
<view class="applyPin" @click="applyPin"> 参与拼单 </view>
|
<view class="applyPin" @click="applyPin"> 参与拼单 </view>
|
||||||
</view>
|
</view>
|
||||||
@@ -143,17 +162,17 @@
|
|||||||
<view class="sku" v-for="(item,index) in specs" :key="item.spec_id">
|
<view class="sku" v-for="(item,index) in specs" :key="item.spec_id">
|
||||||
<view class="sku-title">{{item.name}}</view>
|
<view class="sku-title">{{item.name}}</view>
|
||||||
<view class="sku-list">
|
<view class="sku-list">
|
||||||
<block v-for="it in item.values" :keys='it.value_id'>
|
<block v-for="it in item.values" :key='it.value_id'>
|
||||||
<view :class="['sku-item',specselect[index] == it.value_id ? 'sku-active':'']"
|
<view :class="['sku-item',specselect[index] == it.value_id ? 'sku-active':'']" @click="clickSkus(index,it.value_id)">
|
||||||
@click="clickSkus(index,it.value_id)"> {{it.value}} </view>
|
{{it.value}}
|
||||||
|
</view>
|
||||||
</block>
|
</block>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="buy-number">
|
<view class="buy-number">
|
||||||
<view class="buy-title">数量</view>
|
<view class="buy-title">数量</view>
|
||||||
<uni-number-box :min="1" :max="selectSkusValues.stock" :disabled="selectSkusValues.stock == 0"
|
<uni-number-box :min="1" :max="selectSkusValues.stock" :disabled="selectSkusValues.stock == 0" @change="qty = $event" />
|
||||||
@change="qty = $event" />
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 立即购买 shop_vip.status 区分是否是 vip 商品 只支持单规格php 规定不支持多规格 否则的就却分是拼团商品还是普通商品 -->
|
<!-- 立即购买 shop_vip.status 区分是否是 vip 商品 只支持单规格php 规定不支持多规格 否则的就却分是拼团商品还是普通商品 -->
|
||||||
@@ -162,8 +181,7 @@
|
|||||||
@click="vipBuy">立即领取</button>
|
@click="vipBuy">立即领取</button>
|
||||||
<!-- 非vip 规格弹窗 普通商品立即购买,拼单商品立即拼单 -->
|
<!-- 非vip 规格弹窗 普通商品立即购买,拼单商品立即拼单 -->
|
||||||
<block v-else>
|
<block v-else>
|
||||||
<button class="now-buy" type="default" hover-class="none"
|
<button class="now-buy" type="default" hover-class="none" @click="buy2(selectSkusValues)">立即购买</button>
|
||||||
@click="buy2(selectSkusValues)">立即购买</button>
|
|
||||||
</block>
|
</block>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</u-popup>
|
</u-popup>
|
||||||
@@ -196,13 +214,7 @@
|
|||||||
specselect: [],
|
specselect: [],
|
||||||
selectSkusValues: {},
|
selectSkusValues: {},
|
||||||
qty: 1,
|
qty: 1,
|
||||||
actives: [{
|
collages: [], // 可拼单列表
|
||||||
urls: [
|
|
||||||
'https://cdn.uviewui.com/uview/album/1.jpg',
|
|
||||||
'https://cdn.uviewui.com/uview/album/2.jpg'
|
|
||||||
],
|
|
||||||
name: "洛基洛基、张三张三张三张三张三张三"
|
|
||||||
}, ],
|
|
||||||
getMorePin: false, // 更多可拼团列表是否显示
|
getMorePin: false, // 更多可拼团列表是否显示
|
||||||
pinShow: false, // 与谁谁谁的拼团是否显示
|
pinShow: false, // 与谁谁谁的拼团是否显示
|
||||||
shop_vip: {
|
shop_vip: {
|
||||||
@@ -210,6 +222,8 @@
|
|||||||
// "is_vip": true, // 当前会员是否是 vip true 是会员 false 非会员
|
// "is_vip": true, // 当前会员是否是 vip true 是会员 false 非会员
|
||||||
// "is_receive": false // 当前会员是否已领取过 false 未领取 true 已领取
|
// "is_receive": false // 当前会员是否已领取过 false 未领取 true 已领取
|
||||||
},
|
},
|
||||||
|
// collageid:'' ,// 拼团 id
|
||||||
|
collageitem:'',// 已选择的拼团的 item
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
@@ -217,9 +231,9 @@
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getGoods() {
|
getGoods() {
|
||||||
let id = this.$Route.query.id
|
let id = this.$Route.query.id;
|
||||||
// let id = 61; // 普通商品
|
// let id = 61; // 普通商品
|
||||||
// let id = 91; // 拼团商品
|
// let id = 95; // 拼团商品
|
||||||
goods(id).then(res => {
|
goods(id).then(res => {
|
||||||
this.goods = res
|
this.goods = res
|
||||||
this.specs = res.specs
|
this.specs = res.specs
|
||||||
@@ -229,6 +243,7 @@
|
|||||||
this.specselect = res.skus[0].unit.split('|')
|
this.specselect = res.skus[0].unit.split('|')
|
||||||
this.selectSkusValues = res.skus[0]
|
this.selectSkusValues = res.skus[0]
|
||||||
this.shop_vip = res.shop_vip
|
this.shop_vip = res.shop_vip
|
||||||
|
this.collages = res.active.collages
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
open() {
|
open() {
|
||||||
@@ -245,8 +260,26 @@
|
|||||||
},
|
},
|
||||||
// 去拼单
|
// 去拼单
|
||||||
toPin(item) {
|
toPin(item) {
|
||||||
|
console.log(item);
|
||||||
this.close();
|
this.close();
|
||||||
this.pinShow = true
|
if(item.can_share){
|
||||||
|
this.share()
|
||||||
|
}else{
|
||||||
|
this.pinShow = true;
|
||||||
|
this.collageitem = item
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 分享
|
||||||
|
share(){
|
||||||
|
console.log(' 分享。。。')
|
||||||
|
},
|
||||||
|
// 弹出 拼团不可点
|
||||||
|
showPinToast(){
|
||||||
|
uni.showToast({
|
||||||
|
title:this.goods.active.message,
|
||||||
|
icon:'none',
|
||||||
|
mask:true,
|
||||||
|
})
|
||||||
},
|
},
|
||||||
clickSkus(index, id) {
|
clickSkus(index, id) {
|
||||||
this.skuid = ''
|
this.skuid = ''
|
||||||
@@ -279,27 +312,32 @@
|
|||||||
}
|
}
|
||||||
this.specselect = newlist
|
this.specselect = newlist
|
||||||
},
|
},
|
||||||
|
toVip(){
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/store/vip/index/index?id=' + this.goods.shop.shop_id,
|
||||||
|
})
|
||||||
|
},
|
||||||
// 会员商品领取
|
// 会员商品领取
|
||||||
vipBuy() {
|
vipBuy() {
|
||||||
if (this.shop_vip.is_vip) {
|
if (this.shop_vip.is_vip) {
|
||||||
if (this.shop_vip.is_receive) {
|
if (this.shop_vip.is_receive) {
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: '温馨提示',
|
title: '温馨提示',
|
||||||
content: '您已经领取过商品想要获得更多新商品,请联系线下商家:' + this.goods.shop.mobile+'进行更换',
|
content: this.shop_vip.alert_text+'请联系线下商家:' + this.goods.shop.mobile,
|
||||||
cancelText: '再看看',
|
cancelText: '再看看',
|
||||||
cancelColor: '#999',
|
cancelColor: '#999',
|
||||||
showCancel:false,
|
showCancel:false,
|
||||||
confirmColor: '#34ce98',
|
confirmColor: '#34ce98',
|
||||||
confirmText: ' 知道了',
|
confirmText: ' 知道了',
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
// if (res.confirm) {
|
// if (res.confirm) {
|
||||||
// //#ifdef MP-WEIXIN
|
// //#ifdef MP-WEIXIN
|
||||||
// uni.makePhoneCall({
|
// uni.makePhoneCall({
|
||||||
// phoneNumber: '18354789632'
|
// phoneNumber: '18354789632'
|
||||||
// });
|
// });
|
||||||
// //#endif
|
// //#endif
|
||||||
// //#ifdef APP-PLUS
|
// //#ifdef APP-PLUS
|
||||||
// plus.device.dial('18354789632', true);
|
// plus.device.dial('18354789632', true);
|
||||||
// //#endif
|
// //#endif
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
@@ -320,8 +358,7 @@
|
|||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
this.close();
|
this.close();
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/store/vip/index/index?id=' + this.goods.shop
|
url: '/pages/store/vip/index/index?id=' + this.goods.shop.shop_id
|
||||||
.shop_id,
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -358,12 +395,18 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
goUrl() {
|
goUrl() {
|
||||||
|
let params = {
|
||||||
|
skuId: this.skuid,
|
||||||
|
qty: this.qty
|
||||||
|
}
|
||||||
|
if(this.goods.is_active){
|
||||||
|
params.type ='pin';
|
||||||
|
params.collageid = this.collageitem.collage_id || '';
|
||||||
|
}
|
||||||
|
console.log(params)
|
||||||
this.$Router.push({
|
this.$Router.push({
|
||||||
name: 'StoreBuy',
|
name: 'StoreBuy',
|
||||||
params: {
|
params:params
|
||||||
skuId: this.skuid,
|
|
||||||
qty: this.qty
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
this.close()
|
this.close()
|
||||||
},
|
},
|
||||||
@@ -375,10 +418,14 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 参与别人的拼团
|
||||||
applyPin() {
|
applyPin() {
|
||||||
uni.navigateTo({
|
if (this.$store.state.token === '') {
|
||||||
url: '/pages/group-book/success/success'
|
const Auth = new userAuth()
|
||||||
})
|
Auth.Login()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.goUrl();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -423,17 +470,17 @@
|
|||||||
color: white;
|
color: white;
|
||||||
font-size: $title-size-m;
|
font-size: $title-size-m;
|
||||||
text-shadow: 0 5rpx 5rpx rgba($color: #000000, $alpha: .02);
|
text-shadow: 0 5rpx 5rpx rgba($color: #000000, $alpha: .02);
|
||||||
}
|
}
|
||||||
.vipGoodsInfo{
|
.vipGoodsInfo{
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
z-index: 10;
|
z-index: 10;
|
||||||
background-color: #d81e06;
|
background-color: #d81e06;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
padding: 4rpx 30rpx;
|
padding: 4rpx 30rpx;
|
||||||
border-radius: 0 0 40rpx 0;
|
border-radius: 0 0 40rpx 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -446,13 +493,13 @@
|
|||||||
border-radius: $radius $radius 0 0;
|
border-radius: $radius $radius 0 0;
|
||||||
box-shadow: 0 0 10rpx 10rpx rgba($color: #000000, $alpha: .02);
|
box-shadow: 0 0 10rpx 10rpx rgba($color: #000000, $alpha: .02);
|
||||||
padding-bottom: ($padding*2) + 90;
|
padding-bottom: ($padding*2) + 90;
|
||||||
.vipType{
|
.vipType{
|
||||||
color: #fff;
|
color: #fff;
|
||||||
font-size:28rpx;
|
font-size:28rpx;
|
||||||
margin-right:10rpx;
|
margin-right:10rpx;
|
||||||
padding: 2rpx 20rpx;
|
padding: 2rpx 20rpx;
|
||||||
background-color: #ee8000;
|
background-color: #e5c175;
|
||||||
border-radius: 20rpx 0 20rpx 0;
|
border-radius: 20rpx 0 20rpx 0;
|
||||||
}
|
}
|
||||||
.hr {
|
.hr {
|
||||||
position: relative;
|
position: relative;
|
||||||
@@ -512,13 +559,13 @@
|
|||||||
text {
|
text {
|
||||||
font-size: 60%;
|
font-size: 60%;
|
||||||
margin-left: 10rpx;
|
margin-left: 10rpx;
|
||||||
}
|
}
|
||||||
.del{
|
.del{
|
||||||
text-decoration: line-through;
|
text-decoration: line-through;
|
||||||
margin-left: 20rpx;
|
margin-left: 20rpx;
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
color:#999;
|
color:#999;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -573,6 +620,54 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.vipInfo {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
box-sizing: border-box;
|
||||||
|
background-image: linear-gradient(to right, #38353c, #5f585f);
|
||||||
|
padding: 0 $padding;
|
||||||
|
margin: 0 $margin;
|
||||||
|
border-radius: 20rpx 20rpx 0 0;
|
||||||
|
position: relative;
|
||||||
|
height: 140rpx;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
.title {
|
||||||
|
color: rgba($color: #fff, $alpha: 0.8);
|
||||||
|
font-size: 40rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
flex: 1;
|
||||||
|
|
||||||
|
.des {
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: rgba($color: #fff, $alpha: 0.7);
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
image {
|
||||||
|
width: 500rpx;
|
||||||
|
height: 400rpx;
|
||||||
|
position: absolute;
|
||||||
|
left: 100rpx;
|
||||||
|
z-index: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn {
|
||||||
|
color: rgba($color: #fff, $alpha: 0.8);
|
||||||
|
background-color: #38353c;
|
||||||
|
opacity: 1 !important;
|
||||||
|
padding: 10rpx 30rpx;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
position: relative;
|
||||||
|
z-index: 10;
|
||||||
|
font-size: 26rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.is_active {
|
.is_active {
|
||||||
border-top: solid 20rpx #f9f9f9;
|
border-top: solid 20rpx #f9f9f9;
|
||||||
|
|
||||||
@@ -634,6 +729,12 @@
|
|||||||
padding: 6rpx 20rpx;
|
padding: 6rpx 20rpx;
|
||||||
border-radius: 10rpx;
|
border-radius: 10rpx;
|
||||||
}
|
}
|
||||||
|
.noneBtn{
|
||||||
|
border: #999 1rpx solid;
|
||||||
|
color: #999;
|
||||||
|
padding: 6rpx 20rpx;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -805,7 +906,7 @@
|
|||||||
height: 90rpx;
|
height: 90rpx;
|
||||||
margin: 10rpx 20rpx;
|
margin: 10rpx 20rpx;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
|
border:solid 2rpx #f9f9f9;
|
||||||
}
|
}
|
||||||
|
|
||||||
.me {
|
.me {
|
||||||
@@ -833,10 +934,11 @@
|
|||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
content: '拼主';
|
content: '拼主';
|
||||||
border-radius: 20rpx;
|
|
||||||
background: orange;
|
background: orange;
|
||||||
padding: 4rpx 20rpx;
|
padding: 4rpx 0;
|
||||||
font-size: 24rpx;
|
width: 100%;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 20rpx;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -903,6 +1005,12 @@
|
|||||||
padding: 6rpx 20rpx;
|
padding: 6rpx 20rpx;
|
||||||
border-radius: 10rpx;
|
border-radius: 10rpx;
|
||||||
}
|
}
|
||||||
|
.noneBtn{
|
||||||
|
border: #999 1rpx solid;
|
||||||
|
color: #999;
|
||||||
|
padding: 6rpx 20rpx;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1033,5 +1141,5 @@
|
|||||||
border: none;
|
border: none;
|
||||||
margin-top: $margin;
|
margin-top: $margin;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -55,7 +55,7 @@
|
|||||||
<view class="tags"> VIP </view>
|
<view class="tags"> VIP </view>
|
||||||
</view>
|
</view>
|
||||||
<view class="news-title nowrap">{{item.name}}</view>
|
<view class="news-title nowrap">{{item.name}}</view>
|
||||||
<view class="news-price nowrap">{{item.price.price_min}} <text>DT积分</text></view>
|
<view class="news-price nowrap">{{item.price.price_min}} <text>DT积分</text></view>
|
||||||
<!-- <view class="news-price nowrap through">{{item.original_price}} <text>DT积分</text></view> -->
|
<!-- <view class="news-price nowrap through">{{item.original_price}} <text>DT积分</text></view> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -92,6 +92,9 @@
|
|||||||
|
|
||||||
<!-- goods -->
|
<!-- goods -->
|
||||||
<view class="goods-box">
|
<view class="goods-box">
|
||||||
|
<view class="title2">
|
||||||
|
猜你喜欢 <view class="more"><text class="title-des"> | 您身边的快捷推荐</text> <text class="more-txt" @click="$Router.push({name: 'StoreList'})">更多 ></text></view>
|
||||||
|
</view>
|
||||||
<oct-goods :lists="goodsArr" priceType="DT" color="#e6576b"
|
<oct-goods :lists="goodsArr" priceType="DT" color="#e6576b"
|
||||||
@onGoods="$Router.push({ name: 'StoreGoods', params: {id: $event.goods_id}})" />
|
@onGoods="$Router.push({ name: 'StoreGoods', params: {id: $event.goods_id}})" />
|
||||||
<!-- <u-loadmore status="loading" /> -->
|
<!-- <u-loadmore status="loading" /> -->
|
||||||
@@ -112,7 +115,7 @@
|
|||||||
newGood: [],
|
newGood: [],
|
||||||
goodsArr: [],
|
goodsArr: [],
|
||||||
meals: [],
|
meals: [],
|
||||||
shops: [],
|
shops: [],
|
||||||
vips:[]
|
vips:[]
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@@ -127,7 +130,7 @@
|
|||||||
this.newGood = res.news
|
this.newGood = res.news
|
||||||
this.goodTabs = res.categories
|
this.goodTabs = res.categories
|
||||||
this.meals = res.meals
|
this.meals = res.meals
|
||||||
this.shops = res.shops
|
this.shops = res.shops
|
||||||
this.vips = res.vips
|
this.vips = res.vips
|
||||||
uni.stopPullDownRefresh()
|
uni.stopPullDownRefresh()
|
||||||
})
|
})
|
||||||
@@ -167,7 +170,7 @@
|
|||||||
|
|
||||||
// 商城列表
|
// 商城列表
|
||||||
.goods-box {
|
.goods-box {
|
||||||
padding-bottom: $padding;
|
padding: $padding 0;
|
||||||
|
|
||||||
&>.title {
|
&>.title {
|
||||||
padding: $padding $padding 0;
|
padding: $padding $padding 0;
|
||||||
@@ -175,8 +178,43 @@
|
|||||||
color: $text-color;
|
color: $text-color;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
margin-bottom: -$margin/2;
|
margin-bottom: -$margin/2;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.title2 {
|
||||||
|
font-size: $title-size-lg;
|
||||||
|
color: $text-color;
|
||||||
|
font-weight: bold;
|
||||||
|
padding: 0 30rpx 10rpx 30rpx;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: flex-start;
|
||||||
|
box-sizing: border-box;
|
||||||
|
|
||||||
|
.title-des {
|
||||||
|
font-size: 24rpx !important;
|
||||||
|
padding-left: 10rpx;
|
||||||
|
color: $text-gray-m;
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.more {
|
||||||
|
flex: 1;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding-right: $padding;
|
||||||
|
|
||||||
|
.more-txt {
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: $text-gray;
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 商城分类
|
// 商城分类
|
||||||
@@ -360,16 +398,16 @@
|
|||||||
font-size: $title-size-sm;
|
font-size: $title-size-sm;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: $text-price;
|
color: $text-price;
|
||||||
line-height: 40rpx;
|
line-height: 40rpx;
|
||||||
|
|
||||||
text {
|
text {
|
||||||
margin-left: 6rpx;
|
margin-left: 6rpx;
|
||||||
font-size: 70%;
|
font-size: 70%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.through{
|
.through{
|
||||||
text-decoration: line-through !important;
|
text-decoration: line-through !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -505,5 +543,5 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { lists, classify } from "@/apis/interfaces/store"
|
import { lists, categories } from "@/apis/interfaces/store"
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -46,17 +46,21 @@
|
|||||||
uni.setNavigationBarTitle({
|
uni.setNavigationBarTitle({
|
||||||
title: this.$Route.query.title
|
title: this.$Route.query.title
|
||||||
})
|
})
|
||||||
|
if (this.$Route.query.id) {
|
||||||
|
this.cid = this.$Route.query.id
|
||||||
|
} else {
|
||||||
|
this.getClassify();
|
||||||
|
}
|
||||||
this.getLists()
|
this.getLists()
|
||||||
this.getClassify()
|
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
// 商品列表
|
// 商品列表
|
||||||
getLists() {
|
getLists() {
|
||||||
lists({
|
let data = {
|
||||||
category_id : this.$Route.query.id,
|
category_id : this.cid,
|
||||||
category_cid: this.cid,
|
|
||||||
page : this.page
|
page : this.page
|
||||||
}).then(res => {
|
};
|
||||||
|
lists(data).then(res => {
|
||||||
if(res.page.current === 1){
|
if(res.page.current === 1){
|
||||||
this.goodsArr = []
|
this.goodsArr = []
|
||||||
}
|
}
|
||||||
@@ -67,14 +71,15 @@
|
|||||||
},
|
},
|
||||||
// 获取二级分类
|
// 获取二级分类
|
||||||
getClassify(){
|
getClassify(){
|
||||||
classify(this.$Route.query.id).then(res => {
|
categories().then(res => {
|
||||||
this.classify = this.classify.concat(res)
|
this.classify = this.classify.concat(res)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 二级分类筛选
|
// 二级分类筛选
|
||||||
onTabs(e){
|
onTabs(e){
|
||||||
this.goodsArr = []
|
this.page = 1;
|
||||||
this.cid = e.category_id
|
this.goodsArr = [];
|
||||||
|
this.cid = e.category_id;
|
||||||
this.getLists()
|
this.getLists()
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -2,22 +2,22 @@
|
|||||||
<view class="groupBook">
|
<view class="groupBook">
|
||||||
<view class="top">
|
<view class="top">
|
||||||
<view class="title">VIP换购</view>
|
<view class="title">VIP换购</view>
|
||||||
<view>千款商品任意换购</view>
|
<view>百款商品任意换购</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 有数据 -->
|
<!-- 有数据 -->
|
||||||
<scroll-view scroll-y="true" class="scroll" @scrolltolower='scrolltolower' v-if="lists.length>0">
|
<scroll-view scroll-y="true" class="scroll" @scrolltolower='scrolltolower' v-if="lists.length>0">
|
||||||
<block v-for="(item,index) in lists" :key="index">
|
<block v-for="(item,index) in lists" :key="index">
|
||||||
<vipGoodsItem :item="item" @goPin="goPin" />
|
<vipGoodsItem :item="item" @goPin="goPin" />
|
||||||
</block>
|
</block>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
<!-- 没数据 -->
|
<!-- 没数据 -->
|
||||||
<scroll-view scroll-y="true" class="scroll" v-else>
|
<scroll-view scroll-y="true" class="scroll" v-else>
|
||||||
<view class="vertical pages-empty" style="padding-top: 200rpx;">
|
<view class="vertical pages-empty" style="padding-top: 200rpx;">
|
||||||
<u-empty
|
<u-empty
|
||||||
icon="http://cdn.uviewui.com/uview/empty/list.png"
|
icon="http://cdn.uviewui.com/uview/empty/list.png"
|
||||||
textColor="#999"
|
textColor="#999"
|
||||||
text="暂无VIP商品~"
|
text="暂无VIP商品~"
|
||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</view>
|
</view>
|
||||||
@@ -46,7 +46,7 @@
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getList() {
|
getList() {
|
||||||
lists({
|
lists({
|
||||||
is_user:'1',
|
is_user:'1',
|
||||||
page: this.page
|
page: this.page
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
@@ -59,25 +59,25 @@
|
|||||||
mask: true
|
mask: true
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 触底获取更多~
|
// 触底获取更多~
|
||||||
scrolltolower() {
|
scrolltolower() {
|
||||||
if (this.has_more) {
|
if (this.has_more) {
|
||||||
this.page = this.page + 1
|
this.page = this.page + 1
|
||||||
this.getList()
|
this.getList()
|
||||||
}else{
|
}else{
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title:'没有更多~',
|
title:'没有更多~',
|
||||||
icon:'none'
|
icon:'none'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 马上拼团
|
// 马上拼团
|
||||||
goPin(id) {
|
goPin(id) {
|
||||||
console.log('fule gopin....')
|
console.log('fule gopin....')
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:'/pages/store/goods?id='+id
|
url:'/pages/store/goods?id='+id
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -123,4 +123,4 @@
|
|||||||
z-index: 2;
|
z-index: 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
684
unpackage/dist/dev/app-plus/app-service.js
vendored
684
unpackage/dist/dev/app-plus/app-service.js
vendored
File diff suppressed because one or more lines are too long
668
unpackage/dist/dev/app-plus/app-view.js
vendored
668
unpackage/dist/dev/app-plus/app-view.js
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user