merge
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Web唐明明
|
* Web唐明明
|
||||||
* 匆匆数载恍如梦,岁月迢迢华发增。
|
* 匆匆数载恍如梦,岁月迢迢华发增。
|
||||||
@@ -11,8 +10,8 @@ import router from '../router'
|
|||||||
// 基础配置
|
// 基础配置
|
||||||
const config = {
|
const config = {
|
||||||
apiUrl : 'https://api.gongli.vip/api/', // 正式环境
|
apiUrl : 'https://api.gongli.vip/api/', // 正式环境
|
||||||
// apiUrl : 'http://api.gl.shangkelian.cn/api/', // 测试
|
// apiUrl: 'http://api.gl.shangkelian.cn/api/', // 测试
|
||||||
timeout : 60000
|
timeout: 60000
|
||||||
}
|
}
|
||||||
|
|
||||||
let loginHintState = false
|
let loginHintState = false
|
||||||
@@ -20,10 +19,10 @@ let loginHintState = false
|
|||||||
// 网络请求
|
// 网络请求
|
||||||
const request = (parameter, hideLoding = true) => {
|
const request = (parameter, hideLoding = true) => {
|
||||||
// 检查url配置
|
// 检查url配置
|
||||||
if(parameter.url === 'undefined' || parameter.url === ''){
|
if (parameter.url === 'undefined' || parameter.url === '') {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '请求地址不能为空',
|
title: '请求地址不能为空',
|
||||||
icon : 'none'
|
icon: 'none'
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -33,31 +32,31 @@ const request = (parameter, hideLoding = true) => {
|
|||||||
'Authorization': store.getters.getToken || uni.getStorageSync('token')
|
'Authorization': store.getters.getToken || uni.getStorageSync('token')
|
||||||
}
|
}
|
||||||
// 加载提示
|
// 加载提示
|
||||||
if(!hideLoding) uni.showLoading({
|
if (!hideLoding) uni.showLoading({
|
||||||
title: '加载中',
|
title: '加载中',
|
||||||
mask : true
|
mask: true
|
||||||
});
|
});
|
||||||
|
|
||||||
// 请求实例
|
// 请求实例
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
uni.request({
|
uni.request({
|
||||||
url : config.apiUrl + parameter.url,
|
url: config.apiUrl + parameter.url,
|
||||||
timeout : config.timeout,
|
timeout: config.timeout,
|
||||||
header : config.header || {},
|
header: config.header || {},
|
||||||
data : parameter.data || {},
|
data: parameter.data || {},
|
||||||
method : parameter.method || 'GET',
|
method: parameter.method || 'GET',
|
||||||
success : res => {
|
success: res => {
|
||||||
if (res.header.Authorization){
|
if (res.header.Authorization) {
|
||||||
updateToken('token', res.header.Authorization)
|
updateToken('token', res.header.Authorization)
|
||||||
}
|
}
|
||||||
if(res.statusCode === 200){
|
if (res.statusCode === 200) {
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
const resolveData = res.data
|
const resolveData = res.data
|
||||||
if(resolveData.status_code === 200) {
|
if (resolveData.status_code === 200) {
|
||||||
resolve(resolveData.data)
|
resolve(resolveData.data)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if(resolveData.status_code === 401) {
|
if (resolveData.status_code === 401) {
|
||||||
loginHint()
|
loginHint()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -69,7 +68,7 @@ const request = (parameter, hideLoding = true) => {
|
|||||||
fail(err) {
|
fail(err) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '网络错误,请检查您设备网络状态',
|
title: '网络错误,请检查您设备网络状态',
|
||||||
icon : 'none'
|
icon: 'none'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -80,7 +79,7 @@ const request = (parameter, hideLoding = true) => {
|
|||||||
const uploading = (paths) => {
|
const uploading = (paths) => {
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: '上传中',
|
title: '上传中',
|
||||||
mask : true
|
mask: true
|
||||||
});
|
});
|
||||||
// 注入header
|
// 注入header
|
||||||
config.header = {
|
config.header = {
|
||||||
@@ -90,14 +89,14 @@ const uploading = (paths) => {
|
|||||||
// 上传图片
|
// 上传图片
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
uni.uploadFile({
|
uni.uploadFile({
|
||||||
url : config.apiUrl + 'storage/uploads',
|
url: config.apiUrl + 'storage/uploads',
|
||||||
files : paths,
|
files: paths,
|
||||||
header : config.header || {},
|
header: config.header || {},
|
||||||
success : res=>{
|
success: res => {
|
||||||
if(res.statusCode === 200){
|
if (res.statusCode === 200) {
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
let updData = JSON.parse(res.data)
|
let updData = JSON.parse(res.data)
|
||||||
if(updData.status_code === 200){
|
if (updData.status_code === 200) {
|
||||||
resolve(updData.data)
|
resolve(updData.data)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -112,23 +111,23 @@ const uploading = (paths) => {
|
|||||||
|
|
||||||
// 处理一些http请求错误提示
|
// 处理一些http请求错误提示
|
||||||
const errToast = (code) => {
|
const errToast = (code) => {
|
||||||
switch (code){
|
switch (code) {
|
||||||
case 404:
|
case 404:
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: code + '接口不存在,请联系系统管理员',
|
title: code + '接口不存在,请联系系统管理员',
|
||||||
icon : 'none'
|
icon: 'none'
|
||||||
})
|
})
|
||||||
break;
|
break;
|
||||||
case 405:
|
case 405:
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: code + '请检查接口请求方式错误',
|
title: code + '请检查接口请求方式错误',
|
||||||
icon : 'none'
|
icon: 'none'
|
||||||
})
|
})
|
||||||
break;
|
break;
|
||||||
case 500:
|
case 500:
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: code + '服务端错误,请检查服务器信息',
|
title: code + '服务端错误,请检查服务器信息',
|
||||||
icon : 'none'
|
icon: 'none'
|
||||||
})
|
})
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -143,19 +142,19 @@ const updateToken = (token) => {
|
|||||||
|
|
||||||
// 处理登录提示
|
// 处理登录提示
|
||||||
const loginHint = () => {
|
const loginHint = () => {
|
||||||
if( loginHintState ) return
|
if (loginHintState) return
|
||||||
if(!loginHintState) loginHintState = true
|
if (!loginHintState) loginHintState = true
|
||||||
updateToken('')
|
updateToken('')
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: '登录提示',
|
title: '登录提示',
|
||||||
content: '您的登录信息已过期,请重新登录',
|
content: '您的登录信息已过期,请重新登录',
|
||||||
confirmColor: '#8b64fd',
|
confirmColor: '#8b64fd',
|
||||||
showCancel:false,
|
showCancel: false,
|
||||||
success: res=> {
|
success: res => {
|
||||||
loginHintState = false
|
loginHintState = false
|
||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
uni.reLaunch({
|
uni.reLaunch({
|
||||||
url:'/pages/auth/auth'
|
url: '/pages/auth/auth'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,14 +40,10 @@ const shopsDetail = (shopId) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 店铺商品
|
// 店铺商品
|
||||||
const shopsGoods = (shopId, categoryId,page) => {
|
const shopsGoods = (data) => {
|
||||||
return request({
|
return request({
|
||||||
url: 'mall/goods',
|
url: 'mall/goods',
|
||||||
data: {
|
data: data
|
||||||
shop_id:shopId,
|
|
||||||
category_id:categoryId,
|
|
||||||
page:page,
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -66,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 => {
|
||||||
@@ -83,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,
|
||||||
@@ -91,6 +117,10 @@ export {
|
|||||||
shopsGoods,
|
shopsGoods,
|
||||||
lists,
|
lists,
|
||||||
buy,
|
buy,
|
||||||
|
buyPin,
|
||||||
verify,
|
verify,
|
||||||
classify
|
collages,
|
||||||
|
repages,
|
||||||
|
classify,
|
||||||
|
categories
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -51,10 +51,21 @@ const relationsVerify = (invite) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 我的卡券
|
||||||
|
const myCard = (data) => {
|
||||||
|
data.receive = 'desc'
|
||||||
|
return request({
|
||||||
|
url: 'mall/shops/users',
|
||||||
|
data:data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
export {
|
export {
|
||||||
info,
|
info,
|
||||||
chainSeed,
|
chainSeed,
|
||||||
invitationCode,
|
invitationCode,
|
||||||
relationsBind,
|
relationsBind,
|
||||||
relationsVerify
|
relationsVerify,
|
||||||
|
myCard
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,6 +36,28 @@ const agreement = (id) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 店铺会员
|
||||||
|
const shopVipInfo = (id) => {
|
||||||
|
return request({
|
||||||
|
url: 'mall/shops/'+id+'/identities'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//开通店铺会员
|
||||||
|
const shopVipCreate = (id,identity) => {
|
||||||
|
return request({
|
||||||
|
url: 'mall/shops/'+id+'/identities/'+identity,
|
||||||
|
method:'POST'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 开通店铺会员微信支付
|
||||||
|
const shopVipWeChat = (id) => {
|
||||||
|
return request({
|
||||||
|
url: 'mall/shops/identities/wechat/'+id,
|
||||||
|
method:'POST'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
export {
|
export {
|
||||||
@@ -43,4 +65,7 @@ export {
|
|||||||
vipPay,
|
vipPay,
|
||||||
payInfo,
|
payInfo,
|
||||||
agreement,
|
agreement,
|
||||||
|
shopVipInfo,
|
||||||
|
shopVipCreate,
|
||||||
|
shopVipWeChat
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,20 +1,16 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="goods-item">
|
<view class="goods-item">
|
||||||
<image
|
<image :src="item.cover" mode="aspectFill" class="goods-cover" />
|
||||||
src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fc-ssl.duitang.com%2Fuploads%2Fitem%2F202003%2F18%2F20200318231340_shbab.thumb.1000_0.jpg&refer=http%3A%2F%2Fc-ssl.duitang.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1662167784&t=893e1b78d1563aa0a9a65f4d14f21643"
|
|
||||||
mode="aspectFill" class="goods-cover" />
|
|
||||||
<view class="goods-info">
|
<view class="goods-info">
|
||||||
<view class="_title">北欧抱枕靠垫沙发垫办公室腰靠等功能弃权</view>
|
<view class="_title">{{item.name}}</view>
|
||||||
<view class="_des">金凯来京东店 </view>
|
<view class="_des">{{item.shop.name}} </view>
|
||||||
<view class="_pin">
|
<view class="_pin">
|
||||||
<view class="_has">
|
<view class="_has" v-if="item.sales>0"> <image src="/static/book/fire.png" mode="widthFix" class="fire" /> 已拼 {{item.sales}} 件 </view>
|
||||||
<image src="/static/book/fire.png" mode="widthFix" class="fire" /> 已拼1件
|
<view class="tuan">{{item.active.number}}人团</view>
|
||||||
</view>
|
|
||||||
<view class="tuan">2人团</view>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="price">
|
<view class="price">
|
||||||
<view class="money"> ¥160.00 </view>
|
<view class="money">{{item.active.price}} <span>DT积分</span> </view>
|
||||||
<view class="now-pin" @click="goPin(90)">马上拼团</view>
|
<view class="now-pin" @click="goPin(item.goods_id)">马上拼团</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -92,6 +88,7 @@
|
|||||||
background-color: rgba($color: $text-price, $alpha: 0.1);
|
background-color: rgba($color: $text-price, $alpha: 0.1);
|
||||||
padding: 4rpx 10rpx;
|
padding: 4rpx 10rpx;
|
||||||
border-radius: 30rpx;
|
border-radius: 30rpx;
|
||||||
|
margin-right: $margin;
|
||||||
|
|
||||||
image {
|
image {
|
||||||
width: 24rpx;
|
width: 24rpx;
|
||||||
@@ -100,9 +97,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.tuan {
|
|
||||||
margin-left: $margin;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.price {
|
.price {
|
||||||
@@ -117,6 +111,11 @@
|
|||||||
font-size: 34rpx;
|
font-size: 34rpx;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: #d81e06;
|
color: #d81e06;
|
||||||
|
span{
|
||||||
|
font-size: 24rpx;
|
||||||
|
margin-left: 10rpx;
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.now-pin {
|
.now-pin {
|
||||||
|
|||||||
@@ -1,75 +0,0 @@
|
|||||||
# 使用方法
|
|
||||||
```
|
|
||||||
<x-pay-pwd
|
|
||||||
ref="xPayPwd"
|
|
||||||
:type="1"
|
|
||||||
:maskClick="true"
|
|
||||||
top="unset"
|
|
||||||
bottom="0rpx"
|
|
||||||
:showClose="false"
|
|
||||||
@change="change"
|
|
||||||
:showHead="true"
|
|
||||||
headText="请输入支付密码"
|
|
||||||
>
|
|
||||||
<template #center>
|
|
||||||
<button @click="clear">插槽</button>
|
|
||||||
</template>
|
|
||||||
</x-pay-pwd>
|
|
||||||
```
|
|
||||||
```
|
|
||||||
export default {
|
|
||||||
methods: {
|
|
||||||
// 监听输入框内容变化
|
|
||||||
change({password}){
|
|
||||||
console.log(password)
|
|
||||||
},
|
|
||||||
// 清空输入框内容,一般用于密码输错手动清空
|
|
||||||
clear(){
|
|
||||||
this.$refs.xPayPwd._clearKey();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
# 属性
|
|
||||||
| 字段 | 类型 | 默认 | 描述 |
|
|
||||||
| --------- | ------- | -------------- | ---------------------------------------- |
|
|
||||||
| type | Number | 1 | 0原生键盘 1自定义键盘 |
|
|
||||||
| maskClick | Boolean | true | 是否允许点击蒙版 |
|
|
||||||
| top | String | 20vh | 中间内容的top值,为absolute的top值 |
|
|
||||||
| bottom | String | 0rpx | 中间内容的bottom值,为absolute的bottom值 |
|
|
||||||
| showClose | Boolean | true | 是否显示关闭按钮 |
|
|
||||||
| showHead | Boolean | true | 是否显示标题 |
|
|
||||||
| headText | String | 请输入支付密码 | 标题文本 |
|
|
||||||
# 事件
|
|
||||||
|
|
||||||
| 事件名 | 默认参数 | 描述 |
|
|
||||||
| ------ | ---------- | -------------------------------- |
|
|
||||||
| change | {password} | 监听内容输入,参数返回输入的内容 |
|
|
||||||
|
|
||||||
# 组件方法
|
|
||||||
| 方法名 | 描述 |
|
|
||||||
| ------ | -------------------------------- |
|
|
||||||
| _open | 打开弹窗 |
|
|
||||||
| _close | 关闭弹窗 |
|
|
||||||
| _clearnKey | 请空输入内容 |
|
|
||||||
|
|
||||||
# 注意
|
|
||||||
|
|
||||||
```
|
|
||||||
ios下输入框不会自动获取焦点,需要手动点击输入区域
|
|
||||||
```
|
|
||||||
|
|
||||||
# 参与贡献
|
|
||||||
+ xueshuai(xueshuai_12@163.com)
|
|
||||||
+ Email:xueshuai_12@163.com
|
|
||||||
+ GitHub:GitHub地址
|
|
||||||
+ QQ交流群:1063233592
|
|
||||||
+ 个人博客:(薛小帅)[http://blog.xueshuai.top]
|
|
||||||
+ 个人公众号:叮当Ding
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
184
components/vip-goods-item/index.vue
Normal file
@@ -0,0 +1,184 @@
|
|||||||
|
<template>
|
||||||
|
<view class="goods-item">
|
||||||
|
<view class="bg"> {{item.shop_vip.message}} </view>
|
||||||
|
<image :src="item.cover" mode="aspectFill" class="goods-cover" />
|
||||||
|
<view class="tags"> VIP </view>
|
||||||
|
<view class="goods-info">
|
||||||
|
<view class="_title">{{item.name}}</view>
|
||||||
|
<view class="_des"> {{item.shop.name}} </view>
|
||||||
|
<view class="_pin" v-if="item.sales>0">
|
||||||
|
<view class="_has">
|
||||||
|
<image src="/static/book/fire.png" mode="widthFix" class="fire" /> 已换购 {{item.sales}} 件
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="price">
|
||||||
|
<view class="money">
|
||||||
|
{{item.price.price_min}} <span>DT积分</span>
|
||||||
|
<span class='del'>{{item.original_price}} DT积分</span>
|
||||||
|
</view>
|
||||||
|
<view class="now-pin" @click="goPin(item.goods_id)">立即领取</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {};
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
item: {
|
||||||
|
type: Object,
|
||||||
|
default: {},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
goPin(id) {
|
||||||
|
this.$emit('goPin', id)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.goods-item {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: flex-start;
|
||||||
|
box-sizing: border-box;
|
||||||
|
background-color: white;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
padding: $padding;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
position: relative;
|
||||||
|
z-index: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
.bg {
|
||||||
|
position: absolute;
|
||||||
|
top: -40rpx;
|
||||||
|
right: -10rpx;
|
||||||
|
opacity: 0.05;
|
||||||
|
font-size: 130rpx;
|
||||||
|
color: #999;
|
||||||
|
z-index: 1;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tags {
|
||||||
|
position: absolute;
|
||||||
|
top: 6rpx;
|
||||||
|
left: -54rpx;
|
||||||
|
background: #d81e06;
|
||||||
|
color: #fff;
|
||||||
|
width: 150rpx;
|
||||||
|
font-size: 24rpx;
|
||||||
|
padding: 4rpx 0;
|
||||||
|
text-align: center;
|
||||||
|
transform: rotate(-45deg);
|
||||||
|
font-weight: bold;
|
||||||
|
letter-spacing: 2rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.goods-cover {
|
||||||
|
width: 160rpx;
|
||||||
|
height: 160rpx;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.goods-info {
|
||||||
|
width: calc(100% - 160rpx - 30rpx);
|
||||||
|
padding-left: $padding;
|
||||||
|
|
||||||
|
._title {
|
||||||
|
overflow: hidden;
|
||||||
|
font-size: 30rpx;
|
||||||
|
font-weight: 600;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
|
||||||
|
._des {
|
||||||
|
font-size: 26rpx;
|
||||||
|
padding: 10rpx 0;
|
||||||
|
margin-bottom: 4rpx;
|
||||||
|
color: #4f300a;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: flex-start;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
._pin {
|
||||||
|
font-size: 26rpx;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: flex-start;
|
||||||
|
box-sizing: border-box;
|
||||||
|
color: $text-gray;
|
||||||
|
|
||||||
|
._has {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: flex-start;
|
||||||
|
box-sizing: border-box;
|
||||||
|
color: #d81e06;
|
||||||
|
background-color: rgba($color: $text-price, $alpha: 0.1);
|
||||||
|
padding: 4rpx 10rpx;
|
||||||
|
border-radius: 30rpx;
|
||||||
|
|
||||||
|
image {
|
||||||
|
width: 24rpx;
|
||||||
|
height: 24rpx;
|
||||||
|
margin-right: 10rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.tuan {
|
||||||
|
margin-left: $margin;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.price {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding-top: 20rpx;
|
||||||
|
|
||||||
|
.money {
|
||||||
|
font-size: 34rpx;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #d81e06;
|
||||||
|
|
||||||
|
span {
|
||||||
|
font-size: 24rpx;
|
||||||
|
margin-left: 10rpx;
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.del {
|
||||||
|
text-decoration: line-through;
|
||||||
|
margin-left: 10rpx;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #999;
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.now-pin {
|
||||||
|
background-color: #d81e06;
|
||||||
|
font-size: 28rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
padding: 6rpx 20rpx;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -47,6 +47,9 @@
|
|||||||
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
|
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
|
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
|
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
|
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
|
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
|
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
|
||||||
|
|||||||
65
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"
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -541,6 +553,43 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
,{
|
||||||
|
"path" : "pages/store/vip/index/index",
|
||||||
|
"style" :
|
||||||
|
{
|
||||||
|
"navigationBarTitleText": "***店铺会员",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
,{
|
||||||
|
"path" : "pages/user/my-card/my-card",
|
||||||
|
"name": "MyCard",
|
||||||
|
"style" :
|
||||||
|
{
|
||||||
|
"navigationBarTitleText": "我的卡券",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
,{
|
||||||
|
"path" : "pages/group-book/success/success",
|
||||||
|
"style" :
|
||||||
|
{
|
||||||
|
"navigationBarTitleText": "拼单更多",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
,{
|
||||||
|
"path" : "pages/store/vip-list/vip-list",
|
||||||
|
"name": "VipList",
|
||||||
|
"style" :
|
||||||
|
{
|
||||||
|
"navigationBarTitleText": "VIP换购中心",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
}
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"tabBar": {
|
"tabBar": {
|
||||||
"borderStyle": "white",
|
"borderStyle": "white",
|
||||||
@@ -580,13 +629,13 @@
|
|||||||
"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": ""
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
<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="暂无任何拼单商品~"
|
text="暂无拼单商品~"
|
||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
|
|||||||
235
pages/group-book/success/success.vue
Normal file
@@ -0,0 +1,235 @@
|
|||||||
|
<template>
|
||||||
|
<view class="pinSuccess">
|
||||||
|
<view class="count-down">
|
||||||
|
<u-count-down ref="countDown" :time="downTime" format="HH:mm:ss" :autoStart="true" millisecond/>
|
||||||
|
</view>
|
||||||
|
<view class="title"> 还差 <span>{{surplus}}</span> 人,赶紧邀请好友来拼单吧 </view>
|
||||||
|
<view class="btn invite"> 邀请好友拼单 </view>
|
||||||
|
<view class="btn index" @click="goIndex"> 去首页逛逛</view>
|
||||||
|
<view class="goodInfo">
|
||||||
|
<view class="avatars">
|
||||||
|
<block v-for="(item,index) in details" :key='index'>
|
||||||
|
<image class="avatar pin" :src="item.cover" mode="aspectFill" />
|
||||||
|
</block>
|
||||||
|
<image class="wen" src="/static/book/wen.png" mode="aspectFill" />
|
||||||
|
</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>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
repages
|
||||||
|
} from '@/apis/interfaces/store.js'
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
goodName: '',
|
||||||
|
details: [],
|
||||||
|
downTime: 0,
|
||||||
|
surplus: 1,
|
||||||
|
order: {}, // order 是{} 标识不是我的订单,否则就是我的订单可以跳转订单详情
|
||||||
|
};
|
||||||
|
},
|
||||||
|
onLoad() {
|
||||||
|
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: {
|
||||||
|
goIndex() {
|
||||||
|
uni.reLaunch({
|
||||||
|
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('是我的跳转订单详情')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
.pinSuccess {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
box-sizing: border-box;
|
||||||
|
|
||||||
|
.count-down {
|
||||||
|
background-color: #f9f9f9;
|
||||||
|
border-radius: 4rpx;
|
||||||
|
padding: 10rpx $padding;
|
||||||
|
margin-top: $margin;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
font-size: 38rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
margin-top: $margin * 2;
|
||||||
|
|
||||||
|
span {
|
||||||
|
color: $main-color;
|
||||||
|
font-size: 42rpx;
|
||||||
|
padding: 0 10rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn {
|
||||||
|
width: 80%;
|
||||||
|
background-color: $main-color;
|
||||||
|
color: #fff;
|
||||||
|
text-align: center;
|
||||||
|
padding: $padding - 4;
|
||||||
|
font-size: 34rpx;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
margin-top: $margin;
|
||||||
|
border: solid $main-color 3rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.invite {
|
||||||
|
margin-top: $margin + 20;
|
||||||
|
}
|
||||||
|
|
||||||
|
.index {
|
||||||
|
background-color: rgba($color: #fff, $alpha: 1.0);
|
||||||
|
color: $main-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.goodInfo {
|
||||||
|
border-top: solid 20rpx #f9f9f9;
|
||||||
|
width: 100%;
|
||||||
|
margin-top: $margin + 20;
|
||||||
|
padding: $padding + 10;
|
||||||
|
box-sizing: border-box;
|
||||||
|
|
||||||
|
.avatars {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
box-sizing: border-box;
|
||||||
|
position: relative;
|
||||||
|
border-bottom: solid 1rpx #f9f9f9;
|
||||||
|
padding-bottom: $padding;
|
||||||
|
|
||||||
|
image {
|
||||||
|
width: 90rpx;
|
||||||
|
height: 90rpx;
|
||||||
|
border-radius: 50%;
|
||||||
|
margin: 10rpx 20rpx;
|
||||||
|
border: solid 2rpx #f9f9f9;
|
||||||
|
}
|
||||||
|
|
||||||
|
.me {
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
&::after {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
content: '我';
|
||||||
|
border-radius: 20rpx;
|
||||||
|
background: $main-color;
|
||||||
|
padding: 4rpx 34rpx;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.pin {
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
&::after {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
content: '拼主';
|
||||||
|
// border-radius: 20rpx;
|
||||||
|
background: orange;
|
||||||
|
padding: 4rpx 0;
|
||||||
|
font-size: 20rpx;
|
||||||
|
width: 100%;
|
||||||
|
text-align: center;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.orderInfo {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
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>
|
||||||
@@ -13,10 +13,13 @@
|
|||||||
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: "",
|
||||||
@@ -28,6 +31,7 @@
|
|||||||
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();
|
||||||
@@ -116,7 +122,7 @@
|
|||||||
this.getDTPAY();
|
this.getDTPAY();
|
||||||
},
|
},
|
||||||
// 点击[取消] 关闭输入框 的回调
|
// 点击[取消] 关闭输入框 的回调
|
||||||
close(){
|
close() {
|
||||||
this.showKeyBoard = false;
|
this.showKeyBoard = false;
|
||||||
this.canpay = true;
|
this.canpay = true;
|
||||||
},
|
},
|
||||||
@@ -125,7 +131,11 @@
|
|||||||
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积分不足',
|
||||||
@@ -161,6 +171,42 @@
|
|||||||
this.canpay = true
|
this.canpay = true
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
} else {
|
||||||
|
if (this.type === 'pin') {
|
||||||
|
console.log('pin........', res)
|
||||||
|
this.canpay = true
|
||||||
|
if (res.detailId) {
|
||||||
|
uni.showLoading({
|
||||||
|
title:'跳转中',
|
||||||
|
mask:true,
|
||||||
|
})
|
||||||
|
setTimeout(() => {
|
||||||
|
uni.hideLoading()
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/group-book/success/success?id=' + res.detailId
|
||||||
|
})
|
||||||
|
}, 2000)
|
||||||
|
|
||||||
|
} else {
|
||||||
|
uni.showModal({
|
||||||
|
title: '温馨提示',
|
||||||
|
content: '该订单拼团成功',
|
||||||
|
confirmText: '查看订单',
|
||||||
|
confirmColor: "#34CE98",
|
||||||
|
cancelText: '再逛逛',
|
||||||
|
cancelColor: "#666666",
|
||||||
|
success: (res) => {
|
||||||
|
if(res.confirm){
|
||||||
|
console.log('挑战到我的拼单列表')
|
||||||
|
} if(res.cancel){
|
||||||
|
uni.navigateTo({
|
||||||
|
url:'/pages/store/index'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: '支付成功',
|
title: '支付成功',
|
||||||
@@ -184,6 +230,7 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
|
|||||||
@@ -12,13 +12,14 @@
|
|||||||
<u-tabs
|
<u-tabs
|
||||||
:list="tabs"
|
:list="tabs"
|
||||||
lineColor="white"
|
lineColor="white"
|
||||||
:activeStyle="{color: 'white', fontWeight: 'bold', fontSize: '14px'}"
|
:activeStyle="{color: 'white', fontWeight: 'bold', fontSize: '15px'}"
|
||||||
:inactiveStyle="{color: 'rgba(255,255,255,.6)', fontSize: '14px'}"
|
:inactiveStyle="{color: 'rgba(255,255,255,.6)', fontSize: '15px'}"
|
||||||
:itemStyle="{'height': '50px'}"
|
:itemStyle="{'height': '50px'}"
|
||||||
@click="onTabs"
|
@click="onTabs"
|
||||||
></u-tabs>
|
/>
|
||||||
</u-sticky>
|
</u-sticky>
|
||||||
<view class="rank_update_time" v-if="type != '3'&& type != '4'">
|
|
||||||
|
<view class="rank_update_time" v-if="type != '3' && type != '4' && end_timestamp">
|
||||||
<view class="title"> 加成{{type === '1'?'结束':'生效'}}倒计时:</view>
|
<view class="title"> 加成{{type === '1'?'结束':'生效'}}倒计时:</view>
|
||||||
<u-count-down
|
<u-count-down
|
||||||
ref="countDown"
|
ref="countDown"
|
||||||
@@ -74,10 +75,8 @@
|
|||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {
|
import {
|
||||||
week,
|
week,
|
||||||
@@ -176,7 +175,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.rank {
|
.rank {
|
||||||
.rank_top {
|
.rank_top {
|
||||||
|
|||||||
@@ -21,7 +21,8 @@
|
|||||||
<image class="order-cover" :src="item.items[0].cover" mode="aspectFill"></image>
|
<image class="order-cover" :src="item.items[0].cover" mode="aspectFill"></image>
|
||||||
<view class="order-title">
|
<view class="order-title">
|
||||||
<view class="title"> {{item.items[0].title}}</view>
|
<view class="title"> {{item.items[0].title}}</view>
|
||||||
<view class="subtitle" v-if="item.items[0] && item.items[0].value"> {{item.items[0].value}} </view>
|
<view class="subtitle" v-if="item.items[0] && item.items[0].value"> {{item.items[0].value}}
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="order-count">
|
<view class="order-count">
|
||||||
<view class="order-price">{{item.items[0].price}}<text class="type">DT积分</text></view>
|
<view class="order-price">{{item.items[0].price}}<text class="type">DT积分</text></view>
|
||||||
@@ -33,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>
|
||||||
@@ -59,28 +60,64 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { buy, verify } from '@/apis/interfaces/store'
|
import {
|
||||||
|
buy,
|
||||||
|
buyPin,
|
||||||
|
verify,
|
||||||
|
collages,
|
||||||
|
} from '@/apis/interfaces/store'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
qty : 0,
|
qty: 0,
|
||||||
goodsInfo : [],
|
goodsInfo: [],
|
||||||
total : 0,
|
total: 0,
|
||||||
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() {
|
||||||
|
console.log(this.type === 'pin')
|
||||||
|
if (this.type == 'pin') {
|
||||||
|
let data = {
|
||||||
|
goods_sku_id: this.$Route.query.skuId,
|
||||||
|
collage_id:this.$Route.query.collageid || '',
|
||||||
|
}
|
||||||
|
console.log(data);
|
||||||
|
buyPin(data).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({})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
} else {
|
||||||
buy({
|
buy({
|
||||||
goods_sku_id: this.$Route.query.skuId,
|
goods_sku_id: this.$Route.query.skuId,
|
||||||
qty: this.qty
|
qty: this.qty
|
||||||
@@ -89,55 +126,126 @@
|
|||||||
this.freight = res.freight
|
this.freight = res.freight
|
||||||
this.total = res.total
|
this.total = res.total
|
||||||
this.goodsInfo = res.detail
|
this.goodsInfo = res.detail
|
||||||
|
this.limit = res.limit
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
uni.showToast({
|
uni.showModal({
|
||||||
title: err.message,
|
title: '温馨提示',
|
||||||
icon : 'none'
|
content: err.message,
|
||||||
|
showCancel: false,
|
||||||
|
confirmColor: '#34CE98',
|
||||||
|
cancelText: '知道了',
|
||||||
|
success: (res) => {
|
||||||
|
uni.navigateBack({})
|
||||||
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
}
|
||||||
},
|
},
|
||||||
numberChange(e){
|
numberChange(e) {
|
||||||
this.qty = e
|
this.qty = e
|
||||||
this.getBuy()
|
this.getBuy()
|
||||||
},
|
},
|
||||||
// 确认订单
|
// 确认订单
|
||||||
subOrder(){
|
subOrder() {
|
||||||
if(this.address === ""){
|
if (this.address === "") {
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title : '提示',
|
title: '提示',
|
||||||
content : '暂未添加收货地址,无法下单',
|
content: '暂未添加收货地址,无法下单',
|
||||||
showCancel : true,
|
showCancel: true,
|
||||||
confirmText : '添加',
|
confirmText: '添加',
|
||||||
success : res => {
|
success: res => {
|
||||||
if(res.confirm){
|
if (res.confirm) {
|
||||||
this.$Router.push({name: 'Address'})
|
this.$Router.push({
|
||||||
|
name: 'Address'
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if(this.canApply){
|
if (this.canApply) {
|
||||||
this.canApply = false;
|
this.canApply = false;
|
||||||
verify({
|
if (this.type == 'pin'){
|
||||||
|
collages({
|
||||||
goods_sku_id: this.$Route.query.skuId,
|
goods_sku_id: this.$Route.query.skuId,
|
||||||
qty : this.qty,
|
collage_id:this.$Route.query.collageid || '',
|
||||||
address_id : this.address.address_id,
|
address_id: this.address.address_id,
|
||||||
remark : this.remark || ''
|
remark: this.remark || ''
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
|
console.log(res)
|
||||||
this.$store.commit('setAddress', {})
|
this.$store.commit('setAddress', {})
|
||||||
this.$Router.replace({
|
this.$Router.replace({
|
||||||
name: 'Pay',
|
name: 'Pay',
|
||||||
params: {
|
params: {
|
||||||
orderNo: res.order_no,
|
orderNo: res.order_no,
|
||||||
price : res.total,
|
price: res.total,
|
||||||
coins : res.coins,
|
coins: res.coins,
|
||||||
|
type:'pin'
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
this.canApply = true
|
this.canApply = true
|
||||||
}).catch(err=>{
|
}).catch(err => {
|
||||||
this.canApply = true
|
this.canApply = true
|
||||||
|
uni.showToast({
|
||||||
|
title: err.message,
|
||||||
|
icon: "none",
|
||||||
|
mask: true,
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
})
|
})
|
||||||
}else{
|
}else{
|
||||||
|
verify({
|
||||||
|
goods_sku_id: this.$Route.query.skuId,
|
||||||
|
qty: this.qty,
|
||||||
|
address_id: this.address.address_id,
|
||||||
|
remark: this.remark || ''
|
||||||
|
}).then(res => {
|
||||||
|
console.log(res)
|
||||||
|
if (res.order_no === '') {
|
||||||
|
uni.showModal({
|
||||||
|
title: ' 温馨提示',
|
||||||
|
content: '领取商品成功',
|
||||||
|
confirmColor: '#34CE98',
|
||||||
|
confirmText: ' 查看订单',
|
||||||
|
cancelColor: '#999',
|
||||||
|
cancelText: '返回首页',
|
||||||
|
success: (res) => {
|
||||||
|
if (res.confirm) {
|
||||||
|
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 {
|
||||||
this.canApply = true
|
this.canApply = true
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -148,133 +256,157 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.content{
|
.content {
|
||||||
background: $window-color;
|
background: $window-color;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
padding-bottom: $padding + 80;
|
padding-bottom: $padding + 80;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
.block{
|
|
||||||
|
.block {
|
||||||
background: white;
|
background: white;
|
||||||
margin: $margin;
|
margin: $margin;
|
||||||
border-radius: $radius;
|
border-radius: $radius;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 地址管理
|
// 地址管理
|
||||||
.address{
|
.address {
|
||||||
position: relative;
|
position: relative;
|
||||||
padding: $padding 80rpx $padding 90rpx;
|
padding: $padding 80rpx $padding 90rpx;
|
||||||
font-size: $title-size-lg;
|
font-size: $title-size-lg;
|
||||||
.user{
|
|
||||||
|
.user {
|
||||||
font-size: $title-size;
|
font-size: $title-size;
|
||||||
line-height: 40rpx;
|
line-height: 40rpx;
|
||||||
color: $text-gray;
|
color: $text-gray;
|
||||||
text{
|
|
||||||
|
text {
|
||||||
color: black;
|
color: black;
|
||||||
max-width: 200rpx;
|
max-width: 200rpx;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin-right: $margin/2;
|
margin-right: $margin/2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.city{
|
|
||||||
|
.city {
|
||||||
padding-top: $padding/2;
|
padding-top: $padding/2;
|
||||||
font-size: $title-size-sm;
|
font-size: $title-size-sm;
|
||||||
color: $text-gray;
|
color: $text-gray;
|
||||||
line-height: 36rpx;
|
line-height: 36rpx;
|
||||||
}
|
}
|
||||||
.address-icon{
|
|
||||||
|
.address-icon {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 50%;
|
top: 50%;
|
||||||
&.location{
|
|
||||||
|
&.location {
|
||||||
margin-top: -26rpx;
|
margin-top: -26rpx;
|
||||||
left: $margin - 10;
|
left: $margin - 10;
|
||||||
}
|
}
|
||||||
&.arrows{
|
|
||||||
|
&.arrows {
|
||||||
margin-top: -20rpx;
|
margin-top: -20rpx;
|
||||||
right: $margin - 10;
|
right: $margin - 10;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.address-new{
|
|
||||||
|
.address-new {
|
||||||
padding: $padding;
|
padding: $padding;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
height: 90rpx;
|
height: 90rpx;
|
||||||
line-height: 90rpx;
|
line-height: 90rpx;
|
||||||
color: $main-color;
|
color: $main-color;
|
||||||
.icon{
|
|
||||||
|
.icon {
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
margin-bottom: 8rpx;
|
margin-bottom: 8rpx;
|
||||||
margin-right: 10rpx;
|
margin-right: 10rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 订单列表
|
// 订单列表
|
||||||
.goods-item{
|
.goods-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: $padding;
|
padding: $padding;
|
||||||
.order-cover{
|
|
||||||
|
.order-cover {
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
width: 128rpx;
|
width: 128rpx;
|
||||||
height: 128rpx;
|
height: 128rpx;
|
||||||
}
|
}
|
||||||
.order-title{
|
|
||||||
|
.order-title {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
padding-left: $margin;
|
padding-left: $margin;
|
||||||
|
|
||||||
// line-height: 40rpx;
|
// line-height: 40rpx;
|
||||||
.title{
|
.title {
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
@extend .ellipsis;
|
@extend .ellipsis;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
.subtitle{
|
|
||||||
|
.subtitle {
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
color: #666;
|
color: #666;
|
||||||
padding-top: 10rpx;
|
padding-top: 10rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.order-count{
|
|
||||||
|
.order-count {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
padding-left: $margin;
|
padding-left: $margin;
|
||||||
line-height: 40rpx;
|
line-height: 40rpx;
|
||||||
.order-price{
|
|
||||||
|
.order-price {
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: $text-price;
|
color: $text-price;
|
||||||
&>text{
|
|
||||||
|
&>text {
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.type{
|
|
||||||
|
.type {
|
||||||
font-size: 22rpx;
|
font-size: 22rpx;
|
||||||
padding-left: 6rpx;
|
padding-left: 6rpx;
|
||||||
}
|
}
|
||||||
.order-sum{
|
|
||||||
|
.order-sum {
|
||||||
font-size: $title-size-sm;
|
font-size: $title-size-sm;
|
||||||
color: $text-gray;
|
color: $text-gray;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 订单信息
|
// 订单信息
|
||||||
.info-box{
|
.info-box {
|
||||||
.info-item{
|
.info-item {
|
||||||
position: relative;
|
position: relative;
|
||||||
padding: $padding $padding $padding 200rpx;
|
padding: $padding $padding $padding 200rpx;
|
||||||
font-size: $title-size-m;
|
font-size: $title-size-m;
|
||||||
min-height: 40rpx;
|
min-height: 40rpx;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
.label{
|
|
||||||
|
.label {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: $margin;
|
left: $margin;
|
||||||
top: $margin;
|
top: $margin;
|
||||||
color: $text-gray;
|
color: $text-gray;
|
||||||
}
|
}
|
||||||
.info-textarea{
|
|
||||||
|
.info-textarea {
|
||||||
height: 120rpx;
|
height: 120rpx;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
font-size: $title-size-m;
|
font-size: $title-size-m;
|
||||||
}
|
}
|
||||||
&::after{
|
|
||||||
|
&::after {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: $margin;
|
left: $margin;
|
||||||
right: $margin;
|
right: $margin;
|
||||||
@@ -283,14 +415,15 @@
|
|||||||
bottom: 0;
|
bottom: 0;
|
||||||
background: $border-color;
|
background: $border-color;
|
||||||
}
|
}
|
||||||
&:last-child::after{
|
|
||||||
|
&:last-child::after {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// footer
|
// footer
|
||||||
.order-footer{
|
.order-footer {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
@@ -301,7 +434,8 @@
|
|||||||
box-shadow: 0 0 10rpx 10rpx rgba($color: #000000, $alpha: .02);
|
box-shadow: 0 0 10rpx 10rpx rgba($color: #000000, $alpha: .02);
|
||||||
z-index: 99;
|
z-index: 99;
|
||||||
display: flex;
|
display: flex;
|
||||||
.total{
|
|
||||||
|
.total {
|
||||||
line-height: 80rpx;
|
line-height: 80rpx;
|
||||||
font-size: $title-size-lg;
|
font-size: $title-size-lg;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
@@ -309,17 +443,20 @@
|
|||||||
color: $text-gray;
|
color: $text-gray;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
@extend .nowrap;
|
@extend .nowrap;
|
||||||
text{
|
|
||||||
|
text {
|
||||||
color: $text-price;
|
color: $text-price;
|
||||||
font-size: $title-size-lg;
|
font-size: $title-size-lg;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
.type{
|
|
||||||
|
.type {
|
||||||
font-size: 22rpx;
|
font-size: 22rpx;
|
||||||
padding-left: 6rpx;
|
padding-left: 6rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.btn{
|
|
||||||
|
.btn {
|
||||||
margin-left: $margin;
|
margin-left: $margin;
|
||||||
width: 300rpx;
|
width: 300rpx;
|
||||||
height: 80rpx;
|
height: 80rpx;
|
||||||
@@ -330,7 +467,8 @@
|
|||||||
background: $main-color;
|
background: $main-color;
|
||||||
color: white;
|
color: white;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
&::after{
|
|
||||||
|
&::after {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,24 +9,78 @@
|
|||||||
</view>
|
</view>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper>
|
</swiper>
|
||||||
<view class="swiper-pages">
|
<view class="swiper-pages"> {{current}}/{{goods.pictures.length}}</view>
|
||||||
{{current}}/{{goods.pictures.length}}
|
<!-- vip 商品提示 -->
|
||||||
</view>
|
<view class="vipGoodsInfo" v-if="shop_vip.status" >{{shop_vip.message}} </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">{{goods.description}}</view>
|
<view class="sub-title">
|
||||||
|
<!-- vip 商品前边 tags -->
|
||||||
|
<span class='vipType' v-if="shop_vip.messageTitle != ''">{{shop_vip.messageTitle}}</span>{{goods.description}}
|
||||||
|
</view>
|
||||||
<view class="box-flex">
|
<view class="box-flex">
|
||||||
|
<!-- vip 商品展示原价 -->
|
||||||
<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>
|
||||||
</view>
|
</view>
|
||||||
<view class="sales" v-if="goods.skus">库存量{{goods.skus[0].stock}}</view>
|
<!-- vip 商品及普通商品展示库存量 -->
|
||||||
|
<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="_has" v-if="goods.active.count>0">
|
||||||
|
<image src="/static/book/fire.png" mode="widthFix" class="fire" /> 已拼{{goods.active.count}}件
|
||||||
</view>
|
</view>
|
||||||
<view class="unit" v-if="goods.skus && goods.skus[0].unit !== ''" @click="open()">
|
<view class="tuan">{{goods.active.number}}人团</view>
|
||||||
<span> 规格 : {{selectSkusValues.unit_text}}</span>
|
</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()">
|
||||||
|
<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 && collages.length>0">
|
||||||
|
<view class="title" v-if="collages.length > 2">
|
||||||
|
这些人刚刚拼单成功,可参与拼单
|
||||||
|
<span @click="getMorePin = true">查看更多
|
||||||
|
<uni-icons type="right" color="#cacaca" />
|
||||||
|
</span>
|
||||||
|
</view>
|
||||||
|
<view class="title" v-if="collages.length <= 2"> {{collages.length}}人正在拼单,可参与拼单 </view>
|
||||||
|
<view class="content">
|
||||||
|
<block v-for="(item,index) in collages" :key="index">
|
||||||
|
<view class="content-item" v-if="index < 2">
|
||||||
|
<view class="info">
|
||||||
|
<u-avatar-group :urls="item.covers" size="34" gap="0.6" class="avatar-group" />
|
||||||
|
<view class="nickname"> {{item.names}}</view>
|
||||||
|
</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>
|
||||||
|
</block>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
<!-- 店铺信息 -->
|
<!-- 店铺信息 -->
|
||||||
<view class="shopInfo" @click="toShop(goods.shop.shop_id)" v-if="goods.shop">
|
<view class="shopInfo" @click="toShop(goods.shop.shop_id)" v-if="goods.shop">
|
||||||
<view class="shopInfo-title-left">
|
<view class="shopInfo-title-left">
|
||||||
@@ -35,10 +89,7 @@
|
|||||||
<view class="shop-titl">{{goods.shop.name}}</view>
|
<view class="shop-titl">{{goods.shop.name}}</view>
|
||||||
<view> 店铺评分:
|
<view> 店铺评分:
|
||||||
<span class='no'>5.0</span>
|
<span class='no'>5.0</span>
|
||||||
<text style="padding-left: 20rpx;">
|
<text style="padding-left: 20rpx;"> 服务态度: <span class='no'>5.0</span> </text>
|
||||||
服务态度:
|
|
||||||
<span class='no'>5.0</span>
|
|
||||||
</text>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -46,19 +97,61 @@
|
|||||||
<uni-icons type="right" color="grey" />
|
<uni-icons type="right" color="grey" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<!-- 商品详情 -->
|
||||||
<view class="imgs">
|
<view class="imgs">
|
||||||
|
<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>
|
<image :src="item" mode="widthFix" />
|
||||||
</block>
|
</block>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 立即购买 -->
|
|
||||||
|
<!-- 立即购买 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" />店铺
|
<!-- vip 规格弹窗立即领取 -->
|
||||||
|
<button type="default" v-if="shop_vip.status" hover-class="none" @click="vipBuy">立即领取</button>
|
||||||
|
<!-- 非vip 规格弹窗 普通商品立即购买,拼单商品立即拼单 -->
|
||||||
|
<block v-else>
|
||||||
|
<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>
|
||||||
</view>
|
</view>
|
||||||
<button type="default" hover-class="none" @click="buy">立即购买</button>
|
<!-- 更多拼单弹窗 -->
|
||||||
|
<u-popup :show="getMorePin" :round="10" mode="center" @close="close" :closeable='true' zIndex="1229930">
|
||||||
|
<view class="getPinTitle"> 可参与拼单 </view>
|
||||||
|
<scroll-view scroll-y="true" class="getPinList">
|
||||||
|
<view class="content">
|
||||||
|
<block v-for="(item,index) in collages" :key="index">
|
||||||
|
<view class="content-item">
|
||||||
|
<view class="info">
|
||||||
|
<u-avatar-group :urls="item.covers" size="34" gap="0.6" class="avatar-group" />
|
||||||
|
<view class="nickname"> {{item.names}}</view>
|
||||||
</view>
|
</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>
|
||||||
|
</block>
|
||||||
|
</view>
|
||||||
|
</scroll-view>
|
||||||
|
</u-popup>
|
||||||
|
|
||||||
|
<!-- 与谁谁的拼团 -->
|
||||||
|
<u-popup :show="pinShow" :round="10" mode="center" @close="close" :closeable='true' zIndex="1229930">
|
||||||
|
<view scroll-y="true" class="content-2">
|
||||||
|
<view class="title"> 参与{{collageitem.names}}的拼单 </view>
|
||||||
|
<view class="number">仅剩<span>{{collageitem.surplus}}</span>个名额</view>
|
||||||
|
<view class="avatars" v-for="(item,index) in collageitem.details" :key='index' >
|
||||||
|
<image :class="['avatar',item.master?'pin':'']" :src="item.cover" mode="aspectFill" />
|
||||||
|
<image class="wen" src="/static/book/wen.png" mode="aspectFill" />
|
||||||
|
</view>
|
||||||
|
<view class="applyPin" @click="applyPin"> 参与拼单 </view>
|
||||||
|
</view>
|
||||||
|
</u-popup>
|
||||||
|
|
||||||
<!-- 多规格弹窗 -->
|
<!-- 多规格弹窗 -->
|
||||||
<u-popup :show="skuShow" :round="10" mode="bottom" @close="close" @open="open">
|
<u-popup :show="skuShow" :round="10" mode="bottom" @close="close" @open="open">
|
||||||
@@ -77,24 +170,32 @@
|
|||||||
<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}}
|
{{it.value}}
|
||||||
</view>
|
</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 规定不支持多规格 否则的就却分是拼团商品还是普通商品 -->
|
||||||
|
<!-- vip 规格弹窗立即领取 -->
|
||||||
|
<button class="now-buy" type="default" v-if="shop_vip.status" hover-class="none"
|
||||||
|
@click="vipBuy">立即领取</button>
|
||||||
|
<!-- 非vip 规格弹窗 普通商品立即购买,拼单商品立即拼单 -->
|
||||||
|
<block v-else>
|
||||||
<button class="now-buy" type="default" hover-class="none" @click="buy2(selectSkusValues)">立即购买</button>
|
<button class="now-buy" type="default" hover-class="none" @click="buy2(selectSkusValues)">立即购买</button>
|
||||||
|
</block>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</u-popup>
|
</u-popup>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {
|
import {
|
||||||
goods
|
goods
|
||||||
@@ -121,15 +222,26 @@
|
|||||||
specselect: [],
|
specselect: [],
|
||||||
selectSkusValues: {},
|
selectSkusValues: {},
|
||||||
qty: 1,
|
qty: 1,
|
||||||
|
collages: [], // 可拼单列表
|
||||||
|
getMorePin: false, // 更多可拼团列表是否显示
|
||||||
|
pinShow: false, // 与谁谁谁的拼团是否显示
|
||||||
|
shop_vip: {
|
||||||
|
// "status": true, // 当前店铺是否是会员制店铺 true 是 false 否
|
||||||
|
// "is_vip": true, // 当前会员是否是 vip true 是会员 false 非会员
|
||||||
|
// "is_receive": false // 当前会员是否已领取过 false 未领取 true 已领取
|
||||||
|
},
|
||||||
|
// collageid:'' ,// 拼团 id
|
||||||
|
collageitem:'',// 已选择的拼团的 item
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
onShow() {
|
||||||
this.getGoods()
|
this.getGoods()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getGoods() {
|
getGoods() {
|
||||||
let id = this.$Route.query.id
|
let id = this.$Route.query.id;
|
||||||
// let id = 61;
|
// let id = 61; // 普通商品
|
||||||
|
// 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
|
||||||
@@ -138,6 +250,8 @@
|
|||||||
this.unitText = res.skus[0].unit_text
|
this.unitText = res.skus[0].unit_text
|
||||||
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.collages = res.active.collages
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
open() {
|
open() {
|
||||||
@@ -146,10 +260,35 @@
|
|||||||
},
|
},
|
||||||
close() {
|
close() {
|
||||||
this.skuShow = false
|
this.skuShow = false
|
||||||
|
this.getMorePin = false
|
||||||
|
this.pinShow = false
|
||||||
this.qty = 1;
|
this.qty = 1;
|
||||||
// this.specselect = this.skus[0].unit.split('|')
|
// this.specselect = this.skus[0].unit.split('|')
|
||||||
// this.selectSkusValues = this.skus[0]
|
// this.selectSkusValues = this.skus[0]
|
||||||
},
|
},
|
||||||
|
// 去拼单
|
||||||
|
toPin(item) {
|
||||||
|
console.log(item);
|
||||||
|
this.close();
|
||||||
|
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 = ''
|
||||||
this.specselect[index] = id;
|
this.specselect[index] = id;
|
||||||
@@ -171,6 +310,7 @@
|
|||||||
str = str + '|' + this.specselect[i]
|
str = str + '|' + this.specselect[i]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
for (var i in this.skus) {
|
for (var i in this.skus) {
|
||||||
if (this.skus[i].unit == str) {
|
if (this.skus[i].unit == str) {
|
||||||
@@ -180,6 +320,59 @@
|
|||||||
}
|
}
|
||||||
this.specselect = newlist
|
this.specselect = newlist
|
||||||
},
|
},
|
||||||
|
toVip(){
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/store/vip/index/index?id=' + this.goods.shop.shop_id,
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 会员商品领取
|
||||||
|
vipBuy() {
|
||||||
|
if (this.shop_vip.is_vip) {
|
||||||
|
if (this.shop_vip.is_receive) {
|
||||||
|
uni.showModal({
|
||||||
|
title: '温馨提示',
|
||||||
|
content: this.shop_vip.alert_text+'请联系线下商家:' + this.goods.shop.mobile,
|
||||||
|
cancelText: '再看看',
|
||||||
|
cancelColor: '#999',
|
||||||
|
showCancel:false,
|
||||||
|
confirmColor: '#34ce98',
|
||||||
|
confirmText: ' 知道了',
|
||||||
|
success: (res) => {
|
||||||
|
// if (res.confirm) {
|
||||||
|
// //#ifdef MP-WEIXIN
|
||||||
|
// uni.makePhoneCall({
|
||||||
|
// phoneNumber: '18354789632'
|
||||||
|
// });
|
||||||
|
// //#endif
|
||||||
|
// //#ifdef APP-PLUS
|
||||||
|
// plus.device.dial('18354789632', true);
|
||||||
|
// //#endif
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
console.log('已经是会员,且未领取领取了商品,')
|
||||||
|
this.goUrl();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
uni.showModal({
|
||||||
|
title: '温馨提示',
|
||||||
|
content: '您还不是该店铺的会员',
|
||||||
|
cancelColor: '#999',
|
||||||
|
cancelText: '再想想',
|
||||||
|
confirmColor: "#34ce98",
|
||||||
|
confirmText: '立即开通',
|
||||||
|
success: (res) => {
|
||||||
|
if (res.confirm) {
|
||||||
|
this.close();
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/store/vip/index/index?id=' + this.goods.shop.shop_id
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
buy() {
|
buy() {
|
||||||
if (this.$store.state.token === '') {
|
if (this.$store.state.token === '') {
|
||||||
const Auth = new userAuth()
|
const Auth = new userAuth()
|
||||||
@@ -210,12 +403,18 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
goUrl() {
|
goUrl() {
|
||||||
this.$Router.push({
|
let params = {
|
||||||
name: 'StoreBuy',
|
|
||||||
params: {
|
|
||||||
skuId: this.skuid,
|
skuId: this.skuid,
|
||||||
qty: this.qty
|
qty: this.qty
|
||||||
}
|
}
|
||||||
|
if(this.goods.is_active){
|
||||||
|
params.type ='pin';
|
||||||
|
params.collageid = this.collageitem.collage_id || '';
|
||||||
|
}
|
||||||
|
console.log(params)
|
||||||
|
this.$Router.push({
|
||||||
|
name: 'StoreBuy',
|
||||||
|
params:params
|
||||||
})
|
})
|
||||||
this.close()
|
this.close()
|
||||||
},
|
},
|
||||||
@@ -227,9 +426,19 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 参与别人的拼团
|
||||||
|
applyPin() {
|
||||||
|
if (this.$store.state.token === '') {
|
||||||
|
const Auth = new userAuth()
|
||||||
|
Auth.Login()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.goUrl();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.goods-swiper {
|
.goods-swiper {
|
||||||
position: relative;
|
position: relative;
|
||||||
@@ -270,6 +479,17 @@
|
|||||||
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{
|
||||||
|
position: absolute;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
z-index: 10;
|
||||||
|
background-color: #d81e06;
|
||||||
|
color: #fff;
|
||||||
|
font-size: 30rpx;
|
||||||
|
padding: 4rpx 30rpx;
|
||||||
|
border-radius: 0 0 40rpx 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 详情
|
// 详情
|
||||||
@@ -281,7 +501,14 @@
|
|||||||
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{
|
||||||
|
color: #fff;
|
||||||
|
font-size:28rpx;
|
||||||
|
margin-right:10rpx;
|
||||||
|
padding: 2rpx 20rpx;
|
||||||
|
background-color: #e5c175;
|
||||||
|
border-radius: 20rpx 0 20rpx 0;
|
||||||
|
}
|
||||||
.hr {
|
.hr {
|
||||||
position: relative;
|
position: relative;
|
||||||
min-height: 1rpx;
|
min-height: 1rpx;
|
||||||
@@ -312,6 +539,12 @@
|
|||||||
padding: $padding;
|
padding: $padding;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-size: $title-size + 14;
|
font-size: $title-size + 14;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: flex-start;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sub-title {
|
.sub-title {
|
||||||
@@ -335,12 +568,51 @@
|
|||||||
font-size: 60%;
|
font-size: 60%;
|
||||||
margin-left: 10rpx;
|
margin-left: 10rpx;
|
||||||
}
|
}
|
||||||
|
.del{
|
||||||
|
text-decoration: line-through;
|
||||||
|
margin-left: 20rpx;
|
||||||
|
font-size: 26rpx;
|
||||||
|
color:#999;
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.sales {
|
.sales {
|
||||||
font-size: $title-size-m;
|
font-size: $title-size-m;
|
||||||
color: $text-gray;
|
color: $text-gray;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
._pin {
|
||||||
|
font-size: 26rpx;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: flex-start;
|
||||||
|
box-sizing: border-box;
|
||||||
|
color: $text-gray;
|
||||||
|
|
||||||
|
._has {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: flex-start;
|
||||||
|
box-sizing: border-box;
|
||||||
|
color: #d81e06;
|
||||||
|
background-color: rgba($color: $text-price, $alpha: 0.1);
|
||||||
|
padding: 4rpx 10rpx;
|
||||||
|
border-radius: 30rpx;
|
||||||
|
|
||||||
|
image {
|
||||||
|
width: 24rpx;
|
||||||
|
height: 24rpx;
|
||||||
|
margin-right: 10rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.tuan {
|
||||||
|
margin-left: $margin;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.unit {
|
.unit {
|
||||||
@@ -356,6 +628,125 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.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 {
|
||||||
|
border-top: solid 20rpx #f9f9f9;
|
||||||
|
|
||||||
|
.title {
|
||||||
|
font-size: 30rpx;
|
||||||
|
color: #333;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
box-sizing: border-box;
|
||||||
|
border-bottom: solid 1rpx #f9f9f9;
|
||||||
|
|
||||||
|
span {
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: #666;
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
padding: 0 $padding;
|
||||||
|
|
||||||
|
.content-item {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
box-sizing: border-box;
|
||||||
|
font-size: 28rpx;
|
||||||
|
padding-bottom: $padding - 10;
|
||||||
|
padding-top: $padding - 10;
|
||||||
|
border-bottom: solid 1rpx #f9f9f9;
|
||||||
|
|
||||||
|
.info {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: flex-start;
|
||||||
|
box-sizing: border-box;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
|
||||||
|
.avatar-group {
|
||||||
|
margin-right: 30rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nickname {
|
||||||
|
width: 300rpx;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn {
|
||||||
|
background-color: $main-color;
|
||||||
|
color: white;
|
||||||
|
padding: 6rpx 20rpx;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
}
|
||||||
|
.noneBtn{
|
||||||
|
border: #999 1rpx solid;
|
||||||
|
color: #999;
|
||||||
|
padding: 6rpx 20rpx;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.imgs {
|
.imgs {
|
||||||
image {
|
image {
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
@@ -475,6 +866,163 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.getPinTitle {
|
||||||
|
text-align: center;
|
||||||
|
font-size: 34rpx;
|
||||||
|
color: #333333;
|
||||||
|
font-weight: bold;
|
||||||
|
padding: $padding - 10 0;
|
||||||
|
border-bottom: solid 1rpx #f9f9f9;
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
width: 100%;
|
||||||
|
background-color: #fff !important;
|
||||||
|
border-radius: 20rpx 20rpx 0 0;
|
||||||
|
z-index: 1000000000000000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content-2 {
|
||||||
|
width: 70vw;
|
||||||
|
|
||||||
|
.title {
|
||||||
|
font-size: 34rpx;
|
||||||
|
color: #333333;
|
||||||
|
font-weight: bold;
|
||||||
|
padding-top: 50rpx;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.number {
|
||||||
|
color: #333333;
|
||||||
|
font-size: 28rpx;
|
||||||
|
text-align: center;
|
||||||
|
color: #999;
|
||||||
|
padding-top: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.avatars {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding-top: $padding * 2;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
image {
|
||||||
|
width: 90rpx;
|
||||||
|
height: 90rpx;
|
||||||
|
margin: 10rpx 20rpx;
|
||||||
|
border-radius: 50%;
|
||||||
|
border:solid 2rpx #f9f9f9;
|
||||||
|
}
|
||||||
|
|
||||||
|
.me {
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
&::after {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
content: '我';
|
||||||
|
border-radius: 20rpx;
|
||||||
|
background: $main-color;
|
||||||
|
padding: 4rpx 34rpx;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.pin {
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
&::after {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
content: '拼主';
|
||||||
|
background: orange;
|
||||||
|
padding: 4rpx 0;
|
||||||
|
width: 100%;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 20rpx;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.applyPin {
|
||||||
|
margin: $margin;
|
||||||
|
background-color: $main-color;
|
||||||
|
color: #fff;
|
||||||
|
padding: $padding - 10;
|
||||||
|
text-align: center;
|
||||||
|
margin-top: 50rpx;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.getPinList {
|
||||||
|
width: 80vw;
|
||||||
|
max-height: 60vh;
|
||||||
|
color: $text-color;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
.content {
|
||||||
|
padding: 0 $padding;
|
||||||
|
padding-top: $padding * 3;
|
||||||
|
|
||||||
|
.content-item {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
box-sizing: border-box;
|
||||||
|
font-size: 28rpx;
|
||||||
|
padding-bottom: $padding - 10;
|
||||||
|
padding-top: $padding - 10;
|
||||||
|
border-bottom: solid 1rpx #f9f9f9;
|
||||||
|
|
||||||
|
.info {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: flex-start;
|
||||||
|
box-sizing: border-box;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
|
||||||
|
.avatar-group {
|
||||||
|
margin-right: 30rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nickname {
|
||||||
|
width: 240rpx;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn {
|
||||||
|
background-color: $main-color;
|
||||||
|
color: white;
|
||||||
|
padding: 6rpx 20rpx;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
}
|
||||||
|
.noneBtn{
|
||||||
|
border: #999 1rpx solid;
|
||||||
|
color: #999;
|
||||||
|
padding: 6rpx 20rpx;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 规格弹窗
|
// 规格弹窗
|
||||||
.skuView {
|
.skuView {
|
||||||
min-height: 30vh;
|
min-height: 30vh;
|
||||||
|
|||||||
@@ -18,7 +18,8 @@
|
|||||||
|
|
||||||
<!-- 健康产品分类 -->
|
<!-- 健康产品分类 -->
|
||||||
<u-scroll-list class="classify-box" indicatorColor="#ddd" indicatorActiveColor="#34CE98">
|
<u-scroll-list class="classify-box" indicatorColor="#ddd" indicatorActiveColor="#34CE98">
|
||||||
<view v-for="(item, index) in goodTabs" :key="index" class="classify-item" @click="$Router.push({name: 'StoreList', params: {id: item.category_id, title: item.name}})">
|
<view v-for="(item, index) in goodTabs" :key="index" class="classify-item"
|
||||||
|
@click="$Router.push({name: 'StoreList', params: {id: item.category_id, title: item.name}})">
|
||||||
<view class="classify-item-nav">
|
<view class="classify-item-nav">
|
||||||
<image class="classify-item-cover" :src="item.cover"></image>
|
<image class="classify-item-cover" :src="item.cover"></image>
|
||||||
<view class="classify-item-title">{{item.name}}</view>
|
<view class="classify-item-title">{{item.name}}</view>
|
||||||
@@ -30,7 +31,8 @@
|
|||||||
<view class="new-box">
|
<view class="new-box">
|
||||||
<view class="title">上新精选<text class="title-des"> | 精品上新新品推荐</text></view>
|
<view class="title">上新精选<text class="title-des"> | 精品上新新品推荐</text></view>
|
||||||
<view class="news">
|
<view class="news">
|
||||||
<view class="news-item" v-for="(item, index) in newGood" :key="index" @click="$Router.push({ name: 'StoreGoods', params: {id: item.goods_id}})">
|
<view class="news-item" v-for="(item, index) in newGood" :key="index"
|
||||||
|
@click="$Router.push({ name: 'StoreGoods', params: {id: item.goods_id}})">
|
||||||
<view class="news-cover">
|
<view class="news-cover">
|
||||||
<image :src="item.cover" mode="aspectFill"></image>
|
<image :src="item.cover" mode="aspectFill"></image>
|
||||||
</view>
|
</view>
|
||||||
@@ -40,14 +42,36 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<!-- VIP换购 -->
|
||||||
|
<view class="new-box" style="margin-top: 30rpx;" v-if="vips.length>0">
|
||||||
|
<view class="title">VIP换购 <view class="more"><text class="title-des"> | 千款商品任意换购</text> <text
|
||||||
|
class="more-txt" @click="$Router.push({name: 'VipList'})">更多 ></text></view>
|
||||||
|
</view>
|
||||||
|
<view class="news">
|
||||||
|
<view class="news-item" v-for="(item, index) in vips" :key="index"
|
||||||
|
@click="$Router.push({ name: 'StoreGoods', params: {id: item.goods_id}})">
|
||||||
|
<view class="news-cover">
|
||||||
|
<image :src="item.cover" mode="aspectFill"></image>
|
||||||
|
<view class="tags"> VIP </view>
|
||||||
|
</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 through">{{item.original_price}} <text>DT积分</text></view> -->
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
<!-- 线下商家 -->
|
<!-- 线下商家 -->
|
||||||
<view class="offline-box">
|
<view class="offline-box">
|
||||||
<view class="title">推荐店铺 <view class="more"><text class="title-des"> | 您身边的优质体验店</text> <text class="more-txt" @click="$Router.push({name: 'ShopList'})">更多></text></view></view>
|
<view class="title">推荐店铺 <view class="more"><text class="title-des"> | 您身边的优质体验店</text> <text
|
||||||
|
class="more-txt" @click="$Router.push({name: 'ShopList'})">更多 ></text></view>
|
||||||
|
</view>
|
||||||
<view class="card-box">
|
<view class="card-box">
|
||||||
<block v-for="(item, index) in shops" :key="index">
|
<block v-for="(item, index) in shops" :key="index">
|
||||||
<view class="card-box-item" style="{'backgrond': #FFF}" v-if="index < 4" @click="$Router.push({name: 'ShopDetail', params: {ShopId: item.shop_id}})">
|
<view class="card-box-item" style="{'backgrond': #FFF}" v-if="index < 4"
|
||||||
|
@click="$Router.push({name: 'ShopDetail', params: {ShopId: item.shop_id}})">
|
||||||
<view class="card-title">{{item.name}}</view>
|
<view class="card-title">{{item.name}}</view>
|
||||||
<view class="card-subtitle"> 优质店铺 </view>
|
<view class="card-subtitle"> {{item.type.code == 2 ? 'VIP优质店铺' : '优质店铺'}} </view>
|
||||||
<view class="card-btn">前往体验</view>
|
<view class="card-btn">前往体验</view>
|
||||||
<image class="card-cover" :src="item.cover" mode="aspectFill" />
|
<image class="card-cover" :src="item.cover" mode="aspectFill" />
|
||||||
</view>
|
</view>
|
||||||
@@ -68,36 +92,38 @@
|
|||||||
|
|
||||||
<!-- goods -->
|
<!-- goods -->
|
||||||
<view class="goods-box">
|
<view class="goods-box">
|
||||||
<oct-goods
|
<view class="title2">
|
||||||
:lists="goodsArr"
|
猜你喜欢 <view class="more"><text class="title-des"> | 您身边的快捷推荐</text> <text class="more-txt" @click="$Router.push({name: 'StoreList'})">更多 ></text></view>
|
||||||
priceType="DT"
|
</view>
|
||||||
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" /> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mall } from "@/apis/interfaces/store"
|
import {
|
||||||
|
mall
|
||||||
|
} from "@/apis/interfaces/store"
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
swiperCount : 0,
|
swiperCount: 0,
|
||||||
banners : [],
|
banners: [],
|
||||||
goodTabs : [],
|
goodTabs: [],
|
||||||
newGood : [],
|
newGood: [],
|
||||||
goodsArr : [],
|
goodsArr: [],
|
||||||
meals : [],
|
meals: [],
|
||||||
shops : [],
|
shops: [],
|
||||||
|
vips:[]
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted(){
|
mounted() {
|
||||||
this.getMall()
|
this.getMall()
|
||||||
},
|
},
|
||||||
methods:{
|
methods: {
|
||||||
getMall(){
|
getMall() {
|
||||||
mall().then(res => {
|
mall().then(res => {
|
||||||
this.banners = res.banners
|
this.banners = res.banners
|
||||||
this.goodsArr = res.goods
|
this.goodsArr = res.goods
|
||||||
@@ -105,19 +131,23 @@
|
|||||||
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
|
||||||
uni.stopPullDownRefresh()
|
uni.stopPullDownRefresh()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
goBook(item){
|
goBook(item) {
|
||||||
if(item.url){
|
console.log(item)
|
||||||
if(item.url.openType === 'navigateTo'){
|
if (item.url) {
|
||||||
let url = item.url.path
|
if (item.url.openType === 'navigateTo') {
|
||||||
if(item.url.params != ''){
|
if (item.url.params != '') {
|
||||||
url = url + '?' + item.url.params
|
|
||||||
}
|
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url
|
url: item.url.path + '?' + item.url.params,
|
||||||
})
|
})
|
||||||
|
} else {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: item.url.path,
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -126,69 +156,117 @@
|
|||||||
this.getMall()
|
this.getMall()
|
||||||
},
|
},
|
||||||
onNavigationBarButtonTap() {
|
onNavigationBarButtonTap() {
|
||||||
this.$Router.push({name: 'StoreSearch'})
|
this.$Router.push({
|
||||||
|
name: 'StoreSearch'
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.content{
|
.content {
|
||||||
background: $window-color;
|
background: $window-color;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 商城列表
|
// 商城列表
|
||||||
.goods-box{
|
.goods-box {
|
||||||
padding-bottom: $padding;
|
padding: $padding 0;
|
||||||
&>.title{
|
|
||||||
|
&>.title {
|
||||||
padding: $padding $padding 0;
|
padding: $padding $padding 0;
|
||||||
font-size: $title-size-lg;
|
font-size: $title-size-lg;
|
||||||
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
// 商城分类
|
// 商城分类
|
||||||
.classify-box{
|
.classify-box {
|
||||||
.classify-item{
|
.classify-item {
|
||||||
padding: 0 10rpx;
|
padding: 0 10rpx;
|
||||||
&:last-child{
|
|
||||||
|
&:last-child {
|
||||||
padding-right: $padding;
|
padding-right: $padding;
|
||||||
}
|
}
|
||||||
&:first-child{
|
|
||||||
|
&:first-child {
|
||||||
padding-left: $padding;
|
padding-left: $padding;
|
||||||
}
|
}
|
||||||
&-nav{
|
|
||||||
|
&-nav {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
width: 138rpx;
|
width: 138rpx;
|
||||||
}
|
}
|
||||||
&-cover{
|
|
||||||
|
&-cover {
|
||||||
width: 86rpx;
|
width: 86rpx;
|
||||||
height: 86rpx;
|
height: 86rpx;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
margin-bottom: $margin/2;
|
margin-bottom: $margin/2;
|
||||||
}
|
}
|
||||||
&-title{
|
|
||||||
|
&-title {
|
||||||
line-height: 40rpx;
|
line-height: 40rpx;
|
||||||
font-size: $title-size-sm;
|
font-size: $title-size-sm;
|
||||||
color: $text-color;
|
color: $text-color;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 卡片推荐
|
// 卡片推荐
|
||||||
.card-box{
|
.card-box {
|
||||||
padding: $padding $padding - 10;
|
padding: $padding $padding - 10;
|
||||||
padding-bottom: 0;
|
padding-bottom: 0;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
&-item{
|
|
||||||
|
&-item {
|
||||||
margin: 0 10rpx;
|
margin: 0 10rpx;
|
||||||
width: calc(50% - 20rpx);
|
width: calc(50% - 20rpx);
|
||||||
padding: $padding;
|
padding: $padding;
|
||||||
border-radius: $radius;
|
border-radius: $radius;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
position: relative;
|
position: relative;
|
||||||
.card-title{
|
|
||||||
|
.card-title {
|
||||||
font-size: $title-size-lg;
|
font-size: $title-size-lg;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: $text-color;
|
color: $text-color;
|
||||||
@@ -198,14 +276,16 @@
|
|||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
.card-subtitle{
|
|
||||||
|
.card-subtitle {
|
||||||
font-size: 22rpx;
|
font-size: 22rpx;
|
||||||
color: $text-gray;
|
color: $text-gray;
|
||||||
// line-height: 40rpx;
|
// line-height: 40rpx;
|
||||||
min-height: 20rpx;
|
min-height: 20rpx;
|
||||||
@extend .nowrap;
|
@extend .nowrap;
|
||||||
}
|
}
|
||||||
.card-cover{
|
|
||||||
|
.card-cover {
|
||||||
width: 80rpx;
|
width: 80rpx;
|
||||||
height: 80rpx;
|
height: 80rpx;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@@ -214,74 +294,129 @@
|
|||||||
top: $margin;
|
top: $margin;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
&-item:nth-child(1){
|
|
||||||
|
&-item:nth-child(1) {
|
||||||
background: #fef2ae;
|
background: #fef2ae;
|
||||||
}
|
}
|
||||||
&-item:nth-child(2){
|
|
||||||
|
&-item:nth-child(2) {
|
||||||
background: #c9ead9;
|
background: #c9ead9;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 上新精选
|
// 上新精选
|
||||||
.new-box{
|
.new-box {
|
||||||
padding: 0 $margin;
|
padding: 0 $margin;
|
||||||
border-radius: $radius;
|
border-radius: $radius;
|
||||||
|
|
||||||
// padding: $padding - 10;
|
// padding: $padding - 10;
|
||||||
.title{
|
.title {
|
||||||
font-size: $title-size-lg;
|
font-size: $title-size-lg;
|
||||||
color: $text-color;
|
color: $text-color;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
padding-bottom: 10rpx;
|
padding-bottom: 10rpx;
|
||||||
.title-des{
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: flex-start;
|
||||||
|
box-sizing: border-box;
|
||||||
|
|
||||||
|
.title-des {
|
||||||
font-size: 24rpx !important;
|
font-size: 24rpx !important;
|
||||||
padding-left: 10rpx;
|
padding-left: 10rpx;
|
||||||
color: $text-gray-m;
|
color: $text-gray-m;
|
||||||
font-weight: normal;
|
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;
|
||||||
}
|
}
|
||||||
.news{
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.news {
|
||||||
margin: $margin/2 -10rpx 0;
|
margin: $margin/2 -10rpx 0;
|
||||||
display: flex;
|
display: flex;
|
||||||
.news-item{
|
|
||||||
|
.news-item {
|
||||||
margin: 0 10rpx;
|
margin: 0 10rpx;
|
||||||
width: calc(25% - 20rpx);
|
width: calc(25% - 20rpx);
|
||||||
.news-cover{
|
|
||||||
|
.news-cover {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding-top: 100%;
|
padding-top: 100%;
|
||||||
background-color: white;
|
background-color: white;
|
||||||
border-radius: $radius-lg;
|
border-radius: $radius-lg;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
image{
|
|
||||||
|
image {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.tags {
|
||||||
|
position: absolute;
|
||||||
|
top: 6rpx;
|
||||||
|
left: -54rpx;
|
||||||
|
background: #d81e06;
|
||||||
|
color: #fff;
|
||||||
|
width: 100%;
|
||||||
|
font-size: 24rpx;
|
||||||
|
padding: 4rpx 0;
|
||||||
|
text-align: center;
|
||||||
|
transform: rotate(-45deg);
|
||||||
|
font-weight: bold;
|
||||||
|
letter-spacing:2rpx;
|
||||||
}
|
}
|
||||||
.news-title{
|
}
|
||||||
|
|
||||||
|
.news-title {
|
||||||
margin-top: $margin/2;
|
margin-top: $margin/2;
|
||||||
font-size: $title-size-sm;
|
font-size: $title-size-sm;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: $text-color;
|
color: $text-color;
|
||||||
line-height: 40rpx;
|
line-height: 40rpx;
|
||||||
}
|
}
|
||||||
.news-price{
|
|
||||||
|
.news-price {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
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{
|
||||||
|
text-decoration: line-through !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.offline-box{
|
|
||||||
.title{
|
.offline-box {
|
||||||
|
.title {
|
||||||
font-size: $title-size-lg;
|
font-size: $title-size-lg;
|
||||||
color: $text-color;
|
color: $text-color;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
@@ -292,7 +427,8 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
.more{
|
|
||||||
|
.more {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
@@ -300,14 +436,16 @@
|
|||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding-right: $padding;
|
padding-right: $padding;
|
||||||
.more-txt{
|
|
||||||
|
.more-txt {
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
color: $text-gray;
|
color: $text-gray;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.card-btn{
|
|
||||||
|
.card-btn {
|
||||||
font-size: 22rpx;
|
font-size: 22rpx;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
padding: 4rpx 20rpx;
|
padding: 4rpx 20rpx;
|
||||||
@@ -317,61 +455,72 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.card-box {
|
.card-box {
|
||||||
|
|
||||||
// &-item{
|
// &-item{
|
||||||
// background: #fff !important;
|
// background: #fff !important;
|
||||||
// }
|
// }
|
||||||
&-item:nth-child(1){
|
&-item:nth-child(1) {
|
||||||
background: #fef2ae;
|
background: #fef2ae;
|
||||||
background: rgba($color: #fef2ae, $alpha:.5);
|
background: rgba($color: #fef2ae, $alpha:.5);
|
||||||
}
|
}
|
||||||
&-item:nth-child(2){
|
|
||||||
|
&-item:nth-child(2) {
|
||||||
background: #c9ead9;
|
background: #c9ead9;
|
||||||
background: rgba($color: #c9ead9, $alpha:.5);
|
background: rgba($color: #c9ead9, $alpha:.5);
|
||||||
}
|
}
|
||||||
&-item:nth-child(3){
|
|
||||||
|
&-item:nth-child(3) {
|
||||||
margin-top: $padding - 8;
|
margin-top: $padding - 8;
|
||||||
background: #bde0ff;
|
background: #bde0ff;
|
||||||
background: rgba($color: #bde0ff, $alpha:.5);
|
background: rgba($color: #bde0ff, $alpha:.5);
|
||||||
}
|
}
|
||||||
&-item:nth-child(4){
|
|
||||||
|
&-item:nth-child(4) {
|
||||||
margin-top: $padding - 8;
|
margin-top: $padding - 8;
|
||||||
background: rgba($color: #ffd9e1, $alpha:.5);
|
background: rgba($color: #ffd9e1, $alpha:.5);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.card-cover{
|
|
||||||
|
.card-cover {
|
||||||
width: 100rpx;
|
width: 100rpx;
|
||||||
height: 100rpx;
|
height: 100rpx;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: $margin;
|
right: $margin;
|
||||||
top: $margin;
|
top: $margin;
|
||||||
}
|
}
|
||||||
.title-des{
|
|
||||||
|
.title-des {
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
padding-left: 10rpx;
|
padding-left: 10rpx;
|
||||||
color: $text-gray-m;
|
color: $text-gray-m;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// swiper
|
// swiper
|
||||||
.swiper{
|
.swiper {
|
||||||
background: linear-gradient(#FFF, #F3F6FB);
|
background: linear-gradient(#FFF, #F3F6FB);
|
||||||
padding: $padding;
|
padding: $padding;
|
||||||
.swiper-box{
|
|
||||||
|
.swiper-box {
|
||||||
position: relative;
|
position: relative;
|
||||||
padding-top: 40%;
|
padding-top: 40%;
|
||||||
|
|
||||||
swiper,
|
swiper,
|
||||||
image{
|
image {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
image{
|
|
||||||
|
image {
|
||||||
border-radius: $radius;
|
border-radius: $radius;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.swiper-pages{
|
|
||||||
|
.swiper-pages {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
z-index: 9;
|
z-index: 9;
|
||||||
left: 0;
|
left: 0;
|
||||||
@@ -379,17 +528,20 @@
|
|||||||
bottom: $margin - 10;
|
bottom: $margin - 10;
|
||||||
height: 7rpx;
|
height: 7rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
.pages-item{
|
|
||||||
|
.pages-item {
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
height: 7rpx;
|
height: 7rpx;
|
||||||
width: 25rpx;
|
width: 25rpx;
|
||||||
margin: 0 5rpx;
|
margin: 0 5rpx;
|
||||||
background: rgba($color: #fff, $alpha: .5);
|
background: rgba($color: #fff, $alpha: .5);
|
||||||
&.show{
|
|
||||||
|
&.show {
|
||||||
background: white;
|
background: white;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
</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()
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,8 @@
|
|||||||
<view>店铺评分:<span class='no'>5.0</span> 服务态度 :<span class='no'>5.0</span></view>
|
<view>店铺评分:<span class='no'>5.0</span> 服务态度 :<span class='no'>5.0</span></view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="shopInfo-title-right"> +关注 </view> -->
|
<view class="shopInfo-title-right" v-if="shopType === 2" @click="goVip"> {{!vip.status?'开通会员':vip.name}}
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="content">
|
<view class="content">
|
||||||
@@ -65,25 +66,38 @@
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
name : '',
|
name: '',
|
||||||
logo : '',
|
logo: '',
|
||||||
category_id : '',
|
category_id: '',
|
||||||
classify : [],
|
classify: [],
|
||||||
goods : [],
|
goods: [],
|
||||||
has_more:true,
|
has_more: true,
|
||||||
page:1,
|
page: 1,
|
||||||
ShopId:'',
|
ShopId: '',
|
||||||
|
shopType: '', // 1。普通商品 2.会员制商品
|
||||||
|
vip: {},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(e) {
|
onLoad(e) {
|
||||||
this.ShopId = this.$Route.query.ShopId
|
this.ShopId = this.$Route.query.ShopId
|
||||||
shopsDetail(this.ShopId).then(res => {
|
shopsDetail(this.ShopId).then(res => {
|
||||||
|
// vip 制 商品
|
||||||
|
if (res.type.code == 2) {
|
||||||
|
this.classify = [{
|
||||||
|
category_id: '',
|
||||||
|
name: '全部活动',
|
||||||
|
}, ...res.identities]
|
||||||
|
} else {
|
||||||
|
// 普通商品
|
||||||
this.classify = [{
|
this.classify = [{
|
||||||
category_id: '',
|
category_id: '',
|
||||||
name: '全部商品',
|
name: '全部商品',
|
||||||
}, ...res.categories]
|
}, ...res.categories]
|
||||||
|
}
|
||||||
this.name = res.name
|
this.name = res.name
|
||||||
this.logo = res.cover
|
this.logo = res.cover
|
||||||
|
this.vip = res.vip
|
||||||
|
this.shopType = res.type.code
|
||||||
this.getGoods()
|
this.getGoods()
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
@@ -101,10 +115,20 @@
|
|||||||
methods: {
|
methods: {
|
||||||
getGoods() {
|
getGoods() {
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title:'请求中~',
|
title: '请求中~',
|
||||||
mask:true,
|
mask: true,
|
||||||
})
|
})
|
||||||
shopsGoods(this.ShopId, this.category_id,this.page).then(res => {
|
let data = {
|
||||||
|
shop_id: this.ShopId,
|
||||||
|
page: this.page,
|
||||||
|
}
|
||||||
|
if (this.shopType == 2) {
|
||||||
|
data.identity_id = this.category_id
|
||||||
|
data.is_user = 1
|
||||||
|
} else {
|
||||||
|
data.category_id = this.category_id
|
||||||
|
}
|
||||||
|
shopsGoods(data).then(res => {
|
||||||
this.goods = this.goods.concat(res.data);
|
this.goods = this.goods.concat(res.data);
|
||||||
this.has_more = res.page.has_more;
|
this.has_more = res.page.has_more;
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
@@ -115,15 +139,15 @@
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
lower(){
|
lower() {
|
||||||
if(this.has_more){
|
if (this.has_more) {
|
||||||
this.page = this.page + 1
|
this.page = this.page + 1
|
||||||
this.getGoods();
|
this.getGoods();
|
||||||
}else{
|
} else {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title:'没有更多~',
|
title: '没有更多~',
|
||||||
icon:"none",
|
icon: "none",
|
||||||
mask:true,
|
mask: true,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -131,7 +155,7 @@
|
|||||||
if (id === this.category_id) return;
|
if (id === this.category_id) return;
|
||||||
this.category_id = id;
|
this.category_id = id;
|
||||||
this.page = 1;
|
this.page = 1;
|
||||||
this.goods =[];
|
this.goods = [];
|
||||||
this.has_more = true;
|
this.has_more = true;
|
||||||
this.getGoods()
|
this.getGoods()
|
||||||
},
|
},
|
||||||
@@ -140,6 +164,11 @@
|
|||||||
name: 'StoreSearch'
|
name: 'StoreSearch'
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
goVip() {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/store/vip/index/index?id=' + this.ShopId
|
||||||
|
})
|
||||||
|
},
|
||||||
onGoods(id) {
|
onGoods(id) {
|
||||||
this.$Router.push({
|
this.$Router.push({
|
||||||
name: 'StoreGoods',
|
name: 'StoreGoods',
|
||||||
@@ -255,7 +284,7 @@
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
width: 100%;
|
max-width: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -378,6 +407,8 @@
|
|||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
position: relative;
|
||||||
|
top: 5rpx;
|
||||||
|
|
||||||
text {
|
text {
|
||||||
margin-right: $margin/2;
|
margin-right: $margin/2;
|
||||||
|
|||||||
126
pages/store/vip-list/vip-list.vue
Normal file
@@ -0,0 +1,126 @@
|
|||||||
|
<template>
|
||||||
|
<view class="groupBook">
|
||||||
|
<view class="top">
|
||||||
|
<view class="title">VIP换购</view>
|
||||||
|
<view>百款商品任意换购</view>
|
||||||
|
</view>
|
||||||
|
<!-- 有数据 -->
|
||||||
|
<scroll-view scroll-y="true" class="scroll" @scrolltolower='scrolltolower' v-if="lists.length>0">
|
||||||
|
<block v-for="(item,index) in lists" :key="index">
|
||||||
|
<vipGoodsItem :item="item" @goPin="goPin" />
|
||||||
|
</block>
|
||||||
|
</scroll-view>
|
||||||
|
<!-- 没数据 -->
|
||||||
|
<scroll-view scroll-y="true" class="scroll" v-else>
|
||||||
|
<view class="vertical pages-empty" style="padding-top: 200rpx;">
|
||||||
|
<u-empty
|
||||||
|
icon="http://cdn.uviewui.com/uview/empty/list.png"
|
||||||
|
textColor="#999"
|
||||||
|
text="暂无VIP商品~"
|
||||||
|
/>
|
||||||
|
</view>
|
||||||
|
</scroll-view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import vipGoodsItem from '@/components/vip-goods-item/index.vue'
|
||||||
|
import {
|
||||||
|
lists
|
||||||
|
} from '@/apis/interfaces/store.js'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
vipGoodsItem
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
lists: [],
|
||||||
|
page: 1,
|
||||||
|
has_more: true,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
|
||||||
|
onLoad() {
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getList() {
|
||||||
|
lists({
|
||||||
|
is_user:'1',
|
||||||
|
page: this.page
|
||||||
|
}).then(res => {
|
||||||
|
this.lists = this.lists.concat(res.data)
|
||||||
|
this.has_more = res.page.has_more
|
||||||
|
}).catch(err => {
|
||||||
|
uni.showToast({
|
||||||
|
title: err.message,
|
||||||
|
icon: "none",
|
||||||
|
mask: true
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 触底获取更多~
|
||||||
|
scrolltolower() {
|
||||||
|
if (this.has_more) {
|
||||||
|
this.page = this.page + 1
|
||||||
|
this.getList()
|
||||||
|
}else{
|
||||||
|
uni.showToast({
|
||||||
|
title:'没有更多~',
|
||||||
|
icon:'none'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 马上拼团
|
||||||
|
goPin(id) {
|
||||||
|
console.log('fule gopin....')
|
||||||
|
uni.navigateTo({
|
||||||
|
url:'/pages/store/goods?id='+id
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
.groupBook {
|
||||||
|
width: 100%;
|
||||||
|
min-height: 100vh;
|
||||||
|
position: relative;
|
||||||
|
background: $window-color;
|
||||||
|
box-sizing: border-box;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
.top {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
font-size: $title-size - 2;
|
||||||
|
color: #fff;
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: $padding;
|
||||||
|
box-sizing: border-box;
|
||||||
|
background: linear-gradient(to bottom, #d81e06, rgba(255, 255, 255, 0));
|
||||||
|
padding-bottom: 40vh;
|
||||||
|
z-index: 1;
|
||||||
|
|
||||||
|
.title {
|
||||||
|
font-size: 40rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.scroll {
|
||||||
|
height: 100vh;
|
||||||
|
position: relative;
|
||||||
|
padding: $padding * 4 $padding $padding $padding;
|
||||||
|
box-sizing: border-box;
|
||||||
|
z-index: 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
344
pages/store/vip/index/index.vue
Normal file
@@ -0,0 +1,344 @@
|
|||||||
|
<template>
|
||||||
|
<view class="store-vip">
|
||||||
|
<image class="vip-bg" src="/static/store/store-vip-bg.png" mode="widthFix"/>
|
||||||
|
<swiper class="swiper" circular>
|
||||||
|
<swiper-item class="swiper-item" v-for="item in vip" :key="item.identity_id">
|
||||||
|
<view class="top">
|
||||||
|
<view class="left" v-if="vip.length > 1">
|
||||||
|
<image class="left-img" src="/static/store/get-more.gif" mode="widthFix" /> 滑动获取更多
|
||||||
|
</view>
|
||||||
|
<view class="content">
|
||||||
|
<!-- 四个角标 -->
|
||||||
|
<block> <image class="jiao" src="/static/store/vip-left-top.png" mode="widthFix" /> <image class="jiao" src="/static/store/vip-right-top.png" mode="widthFix" /> <image class="jiao" src="/static/store/vip-left-bottom.png" mode="widthFix" /> <image class="jiao" src="/static/store/vip-right-bottom.png" mode="widthFix" /> </block>
|
||||||
|
<view class="title1"> {{item.shop.name}} </view>
|
||||||
|
<image class="title2" :src="item.title_cover" mode="widthFix" />
|
||||||
|
<view class="title3"> {{item.description}} </view> <!-- 分类 -->
|
||||||
|
<view class="type">
|
||||||
|
<view class="type-item" v-for="it in item.rules" :key="it.order">
|
||||||
|
<image :src="it.cover" mode="aspectFill" />
|
||||||
|
<view class="title">{{it.name}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="title4">详情咨询可添加产品页下方客服二维码</view>
|
||||||
|
</view>
|
||||||
|
<view class="right" v-if="vip.length > 1"> 滑动获取更多 <image class="right-img" src="/static/store/get-more.gif" mode="widthFix" /> </view>
|
||||||
|
</view>
|
||||||
|
<view class="bottom">
|
||||||
|
<view class="left">
|
||||||
|
<view class="title-1">立享尊贵特权 >> </view>
|
||||||
|
<view class="title-2" v-if="item.vip_info.ended_at"> 到期时间:{{item.vip_info.ended_at}} </view>
|
||||||
|
<view class="title-2" v-if="item.margins.days>0"> 距离{{item.margins.days}}天只需要补{{item.margins.price}}元升级 </view>
|
||||||
|
</view>
|
||||||
|
<view class="right" @click="onOpenVip(item.identity_id)">
|
||||||
|
{{item.is_vip ?'立即续费':item.margins.days>0 ? '立即升级':'立即开通'}}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</swiper-item>
|
||||||
|
</swiper>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
shopVipInfo,
|
||||||
|
shopVipCreate,
|
||||||
|
shopVipWeChat
|
||||||
|
} from '@/apis/interfaces/vip.js'
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
vip: [],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
onLoad(e) {
|
||||||
|
this.id = e.id;
|
||||||
|
this.getInfo()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getInfo() {
|
||||||
|
shopVipInfo(this.id).then(res => {
|
||||||
|
uni.setNavigationBarTitle({
|
||||||
|
title: res[0].shop.name + '会员'
|
||||||
|
});
|
||||||
|
this.vip = res;
|
||||||
|
}).catch(err => {
|
||||||
|
uni.showToast({
|
||||||
|
title: err.message,
|
||||||
|
icon: 'none',
|
||||||
|
mask: true,
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 创建店铺vip会员
|
||||||
|
onOpenVip(identity) {
|
||||||
|
// 获取订单
|
||||||
|
uni.showLoading({
|
||||||
|
title: 'VIP会员开通中'
|
||||||
|
})
|
||||||
|
shopVipCreate(this.id,identity).then(res => {
|
||||||
|
// 支付参数
|
||||||
|
if (res.id) {
|
||||||
|
uni.showLoading({
|
||||||
|
title: '获取支付信息'
|
||||||
|
})
|
||||||
|
this.wxPay(res.id)
|
||||||
|
}
|
||||||
|
}).catch(err => {
|
||||||
|
uni.showToast({
|
||||||
|
title: err.message,
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 微信支付
|
||||||
|
wxPay(orderId) {
|
||||||
|
shopVipWeChat(orderId).then(orderInfo => {
|
||||||
|
uni.requestPayment({
|
||||||
|
provider: "wxpay",
|
||||||
|
orderInfo: JSON.parse(orderInfo),
|
||||||
|
success: res => {
|
||||||
|
uni.showModal({
|
||||||
|
title: '提示',
|
||||||
|
content: '开通成功',
|
||||||
|
showCancel: false,
|
||||||
|
success: () => {
|
||||||
|
uni.navigateBack({})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
fail(err) {
|
||||||
|
let showToast = err.message
|
||||||
|
if (err.errMsg === 'requestPayment:fail [payment微信:-2]User canceled') {
|
||||||
|
showToast = '支付被取消'
|
||||||
|
}
|
||||||
|
uni.showToast({
|
||||||
|
title: showToast,
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}).catch(err => {
|
||||||
|
uni.showToast({
|
||||||
|
title: err.message,
|
||||||
|
icon: 'none',
|
||||||
|
mask:true,
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style lang="scss">
|
||||||
|
.store-vip {
|
||||||
|
height: 100vh;
|
||||||
|
width: 100vw;
|
||||||
|
background-color: #f6f1eb;
|
||||||
|
position: relative;
|
||||||
|
z-index: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
.vip-bg {
|
||||||
|
width: 100%;
|
||||||
|
// height: 100%;
|
||||||
|
position: absolute;
|
||||||
|
z-index: 1;
|
||||||
|
top: -50rpx;
|
||||||
|
left: -50rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.swiper {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
position: relative;
|
||||||
|
z-index: 2;
|
||||||
|
|
||||||
|
.swiper-item {
|
||||||
|
.top {
|
||||||
|
height: calc(100vh - 160rpx);
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-around;
|
||||||
|
box-sizing: border-box;
|
||||||
|
|
||||||
|
.right {
|
||||||
|
font-size: 30rpx;
|
||||||
|
color: #999;
|
||||||
|
text-align: right;
|
||||||
|
width: 100%;
|
||||||
|
padding-bottom: 6%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
box-sizing: border-box;
|
||||||
|
justify-content: flex-end;
|
||||||
|
margin-right: 20%;
|
||||||
|
box-sizing: border-box;
|
||||||
|
.right-img{
|
||||||
|
width: 50rpx;
|
||||||
|
margin-left: 10rpx;
|
||||||
|
opacity: 0.6;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.left {
|
||||||
|
font-size: 30rpx;
|
||||||
|
color: #999;
|
||||||
|
text-align: left;
|
||||||
|
width: 100%;
|
||||||
|
padding-top: 6%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
box-sizing: border-box;
|
||||||
|
justify-content: flex-start;
|
||||||
|
margin-left: 20%;
|
||||||
|
box-sizing: border-box;
|
||||||
|
.left-img{
|
||||||
|
width: 50rpx;
|
||||||
|
transform: rotate(180deg);
|
||||||
|
margin-right: 10rpx;
|
||||||
|
opacity: 0.6;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
padding: $padding * 2;
|
||||||
|
background-color: #fff;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
width: 80%;
|
||||||
|
min-height: 70%;
|
||||||
|
position: relative;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
box-sizing: border-box;
|
||||||
|
|
||||||
|
.title1 {
|
||||||
|
font-size: 34rpx;
|
||||||
|
color: #e5c175;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title2 {
|
||||||
|
padding-top: $padding - 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 0;
|
||||||
|
padding-bottom: $padding - 10;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title3 {
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #2f3245;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title4 {
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #e5c175;
|
||||||
|
padding-top: 30rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.type {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: flex-start;
|
||||||
|
box-sizing: border-box;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
margin-top: $padding * 2;
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
.type-item {
|
||||||
|
width: 33.33%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
box-sizing: border-box;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #2f3245;
|
||||||
|
margin-bottom: 30rpx;
|
||||||
|
|
||||||
|
image {
|
||||||
|
width: 90rpx;
|
||||||
|
height: 90rpx;
|
||||||
|
border-radius: 50%;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.jiao {
|
||||||
|
width: 50rpx;
|
||||||
|
position: absolute;
|
||||||
|
}
|
||||||
|
|
||||||
|
.jiao:nth-child(1) {
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.jiao:nth-child(2) {
|
||||||
|
right: 0;
|
||||||
|
top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.jiao:nth-child(3) {
|
||||||
|
left: 0;
|
||||||
|
bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.jiao:nth-child(4) {
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.bottom {
|
||||||
|
height: 160rpx;
|
||||||
|
background-color: #2f3245;
|
||||||
|
color: #e5c175;
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
|
||||||
|
.left {
|
||||||
|
color: #e5c175;
|
||||||
|
width: 70%;
|
||||||
|
height: 100%;
|
||||||
|
font-weight: bold;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
box-sizing: border-box;
|
||||||
|
|
||||||
|
.title-1 {
|
||||||
|
font-size: 36rpx;
|
||||||
|
}
|
||||||
|
.title-2{
|
||||||
|
font-size: 28rpx;
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.right {
|
||||||
|
background-color: #e5c175;
|
||||||
|
width: 30%;
|
||||||
|
height: 100%;
|
||||||
|
color: #2f3245;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
box-sizing: border-box;
|
||||||
|
font-size: 36rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -114,32 +114,29 @@
|
|||||||
</block>
|
</block>
|
||||||
</view>
|
</view>
|
||||||
<view class="btns-box">
|
<view class="btns-box">
|
||||||
|
<view class="btns-box-item" @click="onBtn('MyCard', {})">
|
||||||
|
<image class="icon" src="@/static/user/userIcon_00.png" mode="widthFix" />
|
||||||
|
我的卡券 <uni-icons class="forward" type="forward" color="#999" />
|
||||||
|
</view>
|
||||||
<view class="btns-box-item" @click="onBtn('Address', { type: 'edit' })">
|
<view class="btns-box-item" @click="onBtn('Address', { type: 'edit' })">
|
||||||
<image class="icon" src="@/static/user/userIcon_03.png" mode="widthFix" />
|
<image class="icon" src="@/static/user/userIcon_03.png" mode="widthFix" />
|
||||||
地址管理
|
地址管理 <uni-icons class="forward" type="forward" color="#999" />
|
||||||
<uni-icons class="forward" type="forward" color="#999" />
|
|
||||||
</view>
|
</view>
|
||||||
<view class="btns-box-item" @click="onBtn('Invitation', {})">
|
<view class="btns-box-item" @click="onBtn('Invitation', {})">
|
||||||
<image class="icon" src="@/static/user/userIcon_07.png" mode="widthFix" />
|
<image class="icon" src="@/static/user/userIcon_07.png" mode="widthFix" />
|
||||||
分享邀请
|
分享邀请 <uni-icons class="forward" type="forward" color="#999" />
|
||||||
<uni-icons class="forward" type="forward" color="#999" />
|
|
||||||
</view>
|
</view>
|
||||||
<view class="btns-box-item" @click="onBtn('Supplier', {})">
|
<view class="btns-box-item" @click="onBtn('Supplier', {})">
|
||||||
<image class="icon" src="@/static/user/userIcon_09.png" mode="widthFix" />
|
<image class="icon" src="@/static/user/userIcon_09.png" mode="widthFix" />
|
||||||
供应商入驻
|
供应商入驻 <uni-icons class="forward" type="forward" color="#999" />
|
||||||
<uni-icons class="forward" type="forward" color="#999" />
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="btns-box">
|
<view class="btns-box">
|
||||||
<view class="btns-box-item" @click="onShare">
|
<view class="btns-box-item" @click="onShare">
|
||||||
<image class="icon" src="@/static/user/userIcon_14.png" mode="widthFix" />
|
<image class="icon" src="@/static/user/userIcon_14.png" mode="widthFix" />
|
||||||
绑定分享关系
|
绑定分享关系
|
||||||
<block v-if="share == null">
|
<block v-if="share == null"> <uni-icons class="forward" type="forward" color="#999" /> </block>
|
||||||
<uni-icons class="forward" type="forward" color="#999" />
|
<block v-else> <text class="forward" style="color: gray;">{{share.nickname}}</text> </block>
|
||||||
</block>
|
|
||||||
<block v-else>
|
|
||||||
<text class="forward" style="color: gray;">{{share.nickname}}</text>
|
|
||||||
</block>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="btns-box">
|
<view class="btns-box">
|
||||||
|
|||||||
179
pages/user/my-card/my-card.vue
Normal file
@@ -0,0 +1,179 @@
|
|||||||
|
<template>
|
||||||
|
<view class="my-card">
|
||||||
|
<view class="select">
|
||||||
|
{{listShowText}} <u-icon class='down' name="arrow-down-fill" size='11' color="#666" />
|
||||||
|
</view>
|
||||||
|
<block v-if="lists.length > 0">
|
||||||
|
<view class="card-item" v-for="item in lists" :key='item.card_id' @click="goShop(item.shop.shop_id)">
|
||||||
|
<image class="card-item-bg" :src="item.message.card_cover" mode="aspectFill" />
|
||||||
|
<view class="card-item-top">
|
||||||
|
<image class="avatar" :src="item.message.cover" mode="aspectFill" />
|
||||||
|
<view class="info">
|
||||||
|
<view class="title"> {{item.shop.name}}</view>
|
||||||
|
<view class="des"> NO.{{item.number}} | {{item.ended_at}} 到期</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="tags">{{item.message.title}}</view>
|
||||||
|
</view>
|
||||||
|
</block>
|
||||||
|
<block v-else>
|
||||||
|
<view class="vertical pages-empty" style="padding-top: 180rpx;">
|
||||||
|
<u-empty icon="http://cdn.uviewui.com/uview/empty/list.png" textColor="#999" text="暂无卡包信息~" />
|
||||||
|
</view>
|
||||||
|
</block>
|
||||||
|
<!-- 筛选 -->
|
||||||
|
<!-- <u-action-sheet :actions="typeList" @select="selectClick" :show="show" cancelText='取消' @close='show = false' /> -->
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
myCard
|
||||||
|
} from '@/apis/interfaces/user.js'
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
page: 1,
|
||||||
|
has_more: true,
|
||||||
|
lists: [],
|
||||||
|
typeList: [{
|
||||||
|
name: '按照会员到期时间排序'
|
||||||
|
}],
|
||||||
|
show: false,
|
||||||
|
listShowText: '按照会员到期时间排序',
|
||||||
|
};
|
||||||
|
},
|
||||||
|
onLoad() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
onReachBottom() {
|
||||||
|
if (this.has_more) {
|
||||||
|
this.page = this.page + 1;
|
||||||
|
this.getList();
|
||||||
|
}else{
|
||||||
|
uni.showToast({
|
||||||
|
title:'没有更多~',
|
||||||
|
icon: "none",
|
||||||
|
mask: true
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
goShop(id) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url:'/pages/store/shop/shopDetail?ShopId=' + id
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getList() {
|
||||||
|
if(this.page === 1){
|
||||||
|
this.lists = []
|
||||||
|
}
|
||||||
|
myCard({
|
||||||
|
page: this.page
|
||||||
|
}).then(res => {
|
||||||
|
this.lists = this.lists.concat(res.data);
|
||||||
|
this.has_more = res.page.has_more;
|
||||||
|
}).catch(err => {
|
||||||
|
uni.showToast({
|
||||||
|
title: err.message,
|
||||||
|
icon: "none",
|
||||||
|
mask: true
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
.my-card{
|
||||||
|
padding-bottom: $padding;
|
||||||
|
}
|
||||||
|
.select {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
box-sizing: border-box;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #666;
|
||||||
|
padding: $padding;
|
||||||
|
|
||||||
|
.down {
|
||||||
|
padding-left: 10rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-item {
|
||||||
|
height: 180rpx;
|
||||||
|
background-color: pink;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
box-sizing: border-box;
|
||||||
|
margin: 0 $margin;
|
||||||
|
margin-bottom: $margin - 10;
|
||||||
|
.tags {
|
||||||
|
position: absolute;
|
||||||
|
top: 22rpx;
|
||||||
|
color: #fff;
|
||||||
|
right: -46rpx;
|
||||||
|
background: rgba($color: #ffaa00, $alpha: 0.9);
|
||||||
|
font-size: 30rpx;
|
||||||
|
padding: 2rpx 50rpx;
|
||||||
|
text-align: center;
|
||||||
|
transform: rotate(45deg);
|
||||||
|
font-weight: bold;
|
||||||
|
letter-spacing:4rpx;
|
||||||
|
z-index: 10;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-item-bg {
|
||||||
|
position: absolute;
|
||||||
|
top: 1;
|
||||||
|
width: 100%;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-item-top {
|
||||||
|
background-color: rgba($color: #000000, $alpha:0.6);
|
||||||
|
width: 100%;
|
||||||
|
height: 180rpx;
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
z-index: 2;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: flex-start;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 0 $padding;
|
||||||
|
|
||||||
|
.avatar {
|
||||||
|
width: 100rpx;
|
||||||
|
height: 100rpx;
|
||||||
|
border-radius: 50%;
|
||||||
|
border: solid 4rpx rgba($color: #fff, $alpha: 0.8);
|
||||||
|
}
|
||||||
|
|
||||||
|
.info {
|
||||||
|
flex: 1;
|
||||||
|
padding-left: $padding;
|
||||||
|
|
||||||
|
.title {
|
||||||
|
font-size: 34rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
color: rgba($color: #fff, $alpha: 0.9);
|
||||||
|
}
|
||||||
|
|
||||||
|
.des {
|
||||||
|
padding-top: 6rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: rgba($color: #fff, $alpha: 0.8);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -12,12 +12,8 @@
|
|||||||
<view>
|
<view>
|
||||||
<view class="vip-lv">{{identity.identity_text}}</view>
|
<view class="vip-lv">{{identity.identity_text}}</view>
|
||||||
<block>
|
<block>
|
||||||
<view class="vip-progress">
|
<view class="vip-progress"> <view class="vip-progress-loding" :style="'width:' + firstRule.rate + '%'"></view> </view>
|
||||||
<view class="vip-progress-loding" :style="'width:' + firstRule.rate + '%'"></view>
|
<view class="vip-loding"> <view>{{firstRule.current}}/{{firstRule.need}}{{firstRule.title}}</view> </view>
|
||||||
</view>
|
|
||||||
<view class="vip-loding">
|
|
||||||
<view>{{firstRule.current}}/{{firstRule.need}}{{firstRule.title}}</view>
|
|
||||||
</view>
|
|
||||||
</block>
|
</block>
|
||||||
</view>
|
</view>
|
||||||
<navigator class="vip-more" url="/pages/vip/agreement?id=2" hover-class="none">成长体系<uni-icons size="14" type="forward" color="#9f5529"></uni-icons></navigator>
|
<navigator class="vip-more" url="/pages/vip/agreement?id=2" hover-class="none">成长体系<uni-icons size="14" type="forward" color="#9f5529"></uni-icons></navigator>
|
||||||
|
|||||||
BIN
static/book/wen.png
Normal file
|
After Width: | Height: | Size: 4.4 KiB |
BIN
static/store/.DS_Store
vendored
Normal file
BIN
static/store/get-more.gif
Normal file
|
After Width: | Height: | Size: 3.3 KiB |
BIN
static/store/store-vip-bg.png
Normal file
|
After Width: | Height: | Size: 142 KiB |
BIN
static/store/store-vip-bg的副本.png
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
static/store/vip-left-bottom.png
Normal file
|
After Width: | Height: | Size: 150 B |
BIN
static/store/vip-left-top.png
Normal file
|
After Width: | Height: | Size: 143 B |
BIN
static/store/vip-right-bottom.png
Normal file
|
After Width: | Height: | Size: 146 B |
BIN
static/store/vip-right-top.png
Normal file
|
After Width: | Height: | Size: 147 B |