删除冗余代码
This commit is contained in:
145
App.vue
145
App.vue
@@ -1,66 +1,99 @@
|
||||
<script>
|
||||
import { getVersions } from './apis/interfaces/versions'
|
||||
import {
|
||||
getVersions
|
||||
} from './apis/interfaces/versions'
|
||||
|
||||
export default {
|
||||
onShow() {
|
||||
// 已经登录过且携带了参数 有弹窗且
|
||||
setTimeout(() => {
|
||||
if (uni.getStorageSync('token')) {
|
||||
if (plus.runtime.arguments.split('?')[1]) {
|
||||
let shareId = plus.runtime.arguments.split('?')[1].split('invitation')[0]
|
||||
if (shareId != '' && shareId != undefined) {
|
||||
uni.showModal({
|
||||
title: ' 温馨提示',
|
||||
content: '有人邀请您一起拼团',
|
||||
cancelColor: '#999',
|
||||
cancelText: '再想想',
|
||||
confirmColor: '#34ce98',
|
||||
confirmText: '立即拼团',
|
||||
success: (res) => {
|
||||
uni.hideLoading()
|
||||
if (res.confirm) {
|
||||
plus.runtime.arguments = null;
|
||||
plus.runtime.arguments = '';
|
||||
uni.navigateTo({
|
||||
url: '/pages/group-book/success/success?access=1&id=' +
|
||||
shareId
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}, 100);
|
||||
},
|
||||
onLaunch: function() {
|
||||
//#ifdef APP-PLUS
|
||||
// 获取系统版本号
|
||||
getVersions({
|
||||
platform: plus.os.name,
|
||||
version : plus.runtime.version
|
||||
}).then(res => {
|
||||
if (res.update) {
|
||||
uni.showModal({
|
||||
title : "更新提示",
|
||||
content : res.note || '版本更新信息',
|
||||
confirmText : "更新",
|
||||
showCancel : !res.info.must,
|
||||
success : modalRes => {
|
||||
if (modalRes.confirm) {
|
||||
if (plus.os.name == "Android") {
|
||||
uni.showToast({
|
||||
title: '新版本下载中,将在下载完成后自动为您安装更新包',
|
||||
icon: 'none'
|
||||
})
|
||||
uni.downloadFile({
|
||||
url: res.info.download,
|
||||
success: apkPick => {
|
||||
plus.runtime.install(apkPick
|
||||
.tempFilePath, '',
|
||||
installRES => {
|
||||
// 安装完成用于提示新版本引导,暂时无用
|
||||
}, installERR => {
|
||||
// 安装失败
|
||||
})
|
||||
},
|
||||
fail(err) {
|
||||
uni.showToast({
|
||||
title: '安装包下载失败,请检查您的网络或稍后重试',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
})
|
||||
// plus.runtime.openURL(res.info.download, err => {
|
||||
// console.log(err)
|
||||
// }, 'com.android.browser');
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: 'IOS应用暂未上架,请打开测试(TestFlight)工具点击更新',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon: 'none'
|
||||
})
|
||||
})
|
||||
// getVersions({
|
||||
// platform: plus.os.name,
|
||||
// version : plus.runtime.version
|
||||
// }).then(res => {
|
||||
// if (res.update) {
|
||||
// uni.showModal({
|
||||
// title : "更新提示",
|
||||
// content : res.note || '版本更新信息',
|
||||
// confirmText : "更新",
|
||||
// showCancel : !res.info.must,
|
||||
// success : modalRes => {
|
||||
// if (modalRes.confirm) {
|
||||
// if (plus.os.name == "Android") {
|
||||
// uni.showToast({
|
||||
// title: '新版本下载中,将在下载完成后自动为您安装更新包',
|
||||
// icon: 'none'
|
||||
// })
|
||||
// uni.downloadFile({
|
||||
// url: res.info.download,
|
||||
// success: apkPick => {
|
||||
// plus.runtime.install(apkPick
|
||||
// .tempFilePath, '',
|
||||
// installRES => {
|
||||
// // 安装完成用于提示新版本引导,暂时无用
|
||||
// }, installERR => {
|
||||
// // 安装失败
|
||||
// })
|
||||
// },
|
||||
// fail(err) {
|
||||
// uni.showToast({
|
||||
// title: '安装包下载失败,请检查您的网络或稍后重试',
|
||||
// icon: 'none'
|
||||
// })
|
||||
// }
|
||||
// })
|
||||
// // plus.runtime.openURL(res.info.download, err => {
|
||||
// // console.log(err)
|
||||
// // }, 'com.android.browser');
|
||||
// } else {
|
||||
// uni.showToast({
|
||||
// title: 'IOS应用暂未上架,请打开测试(TestFlight)工具点击更新',
|
||||
// icon: 'none'
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
// }).catch(err => {
|
||||
// uni.showToast({
|
||||
// title: err.message,
|
||||
// icon: 'none'
|
||||
// })
|
||||
// })
|
||||
//#endif
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ const request = (parameter, hideLoding = true) => {
|
||||
header: config.header || {},
|
||||
data: parameter.data || {},
|
||||
method: parameter.method || 'GET',
|
||||
success: res => {
|
||||
success: res => {
|
||||
if (res.header.Authorization) {
|
||||
updateToken('token', res.header.Authorization)
|
||||
}
|
||||
|
||||
@@ -17,6 +17,24 @@ const pinList = (data) => {
|
||||
})
|
||||
}
|
||||
|
||||
export {
|
||||
pinList
|
||||
// 我的拼团列表
|
||||
const myPinList = (data) => {
|
||||
return request({
|
||||
url: 'mall/collages',
|
||||
data:data
|
||||
})
|
||||
}
|
||||
|
||||
// 根据拼团 id 获取拼团详情
|
||||
const myPinDetail = (id) => {
|
||||
return request({
|
||||
url: 'mall/collages/'+id,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
export {
|
||||
pinList,
|
||||
myPinList,
|
||||
myPinDetail
|
||||
}
|
||||
|
||||
327
components/oct-order-pin/index.vue
Normal file
327
components/oct-order-pin/index.vue
Normal file
@@ -0,0 +1,327 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="order--content" :class="[pattern ? 'chunk': 'broad']">
|
||||
<view class="order--group--header" @click="$emit('onBtn', {type: 'shopsDetail', order: orderInfo})">
|
||||
<image class="logo" v-if="orderInfo.shop.cover != ''" :src="orderInfo.shop.cover" mode="aspectFill">
|
||||
</image>
|
||||
<view class="store">
|
||||
{{orderInfo.shop.name}}
|
||||
<uni-icons type="right" size="16" color="#666" />
|
||||
</view>
|
||||
<view class="stateText" :style="{color: stateColor}">
|
||||
{{orderInfo.collage.status_text}}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="order--header">
|
||||
<view class="order--no">
|
||||
订单号:{{orderInfo.no}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="order--flex" @click="$emit('onBtn', {type: 'goodsDetail', order: orderInfo})">
|
||||
<image class="order--cover" :src="orderInfo.cover" mode="aspectFill"></image>
|
||||
<view class="order--title">
|
||||
{{orderInfo.name}}
|
||||
<view class="unit"> {{orderInfo.unit}} </view>
|
||||
</view>
|
||||
<view class="order--count">
|
||||
<view class="order--price">{{orderInfo.price}}<text>DT积分</text></view>
|
||||
<view class="order--sum">共{{orderInfo.sum}} 件</view>
|
||||
</view>
|
||||
</view>
|
||||
<slot name="btns">
|
||||
<view class="flexrow">
|
||||
<view class="">
|
||||
<u-avatar-group :random-bg-color="true" :urls="orderInfo.users" size="26" gap="0.4"
|
||||
class="avatar-group" />
|
||||
</view>
|
||||
<view class="order--btns">
|
||||
<view v-if="orderInfo.collage.status =='3'" class="item item--sign"
|
||||
@click="$emit('onBtn', {type: 'share', order: orderInfo})">
|
||||
分享拼团
|
||||
</view>
|
||||
<view class="item item--cancel" @click="$emit('onBtn', {type: 'goInfo', order: orderInfo})">
|
||||
查看详情
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</slot>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
// 订单样式否为块
|
||||
pattern: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
// 店铺模式
|
||||
stores: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
// 订单信息
|
||||
orderInfo: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {
|
||||
cover: "",
|
||||
name: "",
|
||||
price: "",
|
||||
sum: 1,
|
||||
collage: {},
|
||||
users: [],
|
||||
invite: '',
|
||||
order: {},
|
||||
}
|
||||
}
|
||||
},
|
||||
// 状态标签颜色
|
||||
stateColor: {
|
||||
type: String,
|
||||
default: "#FF6160"
|
||||
},
|
||||
// 可操作按钮组
|
||||
orderBtns: {
|
||||
type: Array,
|
||||
default: () => {
|
||||
return [{
|
||||
text: "订单详情",
|
||||
type: "info"
|
||||
}, {
|
||||
text: "删除订单",
|
||||
type: "delete",
|
||||
style: {
|
||||
color: "#FF6160"
|
||||
}
|
||||
}]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
$margin: 30rpx;
|
||||
$radius: 10rpx;
|
||||
|
||||
.text-nowrap {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.text-ellipsis {
|
||||
display: -webkit-box;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
}
|
||||
|
||||
.order--content {
|
||||
background: white;
|
||||
|
||||
&.chunk {
|
||||
margin: $margin $margin;
|
||||
border-radius: $radius;
|
||||
padding: $margin;
|
||||
}
|
||||
|
||||
&.broad {
|
||||
padding: $margin;
|
||||
border-bottom: solid 1rpx #ddd;
|
||||
}
|
||||
|
||||
.order--header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding-bottom: $margin;
|
||||
border-top: solid 1rpx #f9f9f9;
|
||||
align-items: center;
|
||||
|
||||
&>.order--no {
|
||||
flex: 1;
|
||||
margin-right: $margin;
|
||||
font-size: 26rpx;
|
||||
line-height: 40rpx;
|
||||
color: #555;
|
||||
@extend .text-nowrap;
|
||||
padding-top: 10rpx;
|
||||
}
|
||||
|
||||
&>.stateText {
|
||||
font-size: 26rpx;
|
||||
color: $text-price;
|
||||
}
|
||||
}
|
||||
|
||||
.order--flex {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.order--cover {
|
||||
vertical-align: top;
|
||||
width: 128rpx;
|
||||
height: 128rpx;
|
||||
}
|
||||
|
||||
.order--title {
|
||||
@extend .text-ellipsis;
|
||||
text-align: left;
|
||||
flex: 1;
|
||||
padding-left: $margin;
|
||||
font-size: 28rpx;
|
||||
line-height: 40rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
justify-content: center;
|
||||
box-sizing: border-box;
|
||||
|
||||
.unit {
|
||||
color: #999;
|
||||
font-size: 26rpx;
|
||||
padding-top: 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.order--count {
|
||||
text-align: right;
|
||||
padding-left: $margin;
|
||||
line-height: 40rpx;
|
||||
|
||||
// color: $text-price;
|
||||
.order--price {
|
||||
font-size: 30rpx;
|
||||
font-weight: bold;
|
||||
|
||||
&>text {
|
||||
font-size: 24rpx;
|
||||
font-weight: normal;
|
||||
padding-left: 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.order--sum {
|
||||
font-size: 26rpx;
|
||||
color: #777;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.order--group {
|
||||
.order--group--header {
|
||||
padding-bottom: $margin;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
&>.logo {
|
||||
width: 38rpx;
|
||||
height: 38rpx;
|
||||
vertical-align: middle;
|
||||
margin-right: $margin/2;
|
||||
}
|
||||
|
||||
&>.store {
|
||||
@extend .text-nowrap;
|
||||
flex: 1;
|
||||
margin-right: $margin;
|
||||
font-size: 28rpx;
|
||||
line-height: 40rpx;
|
||||
color: #555;
|
||||
}
|
||||
|
||||
&>.stateText {
|
||||
font-size: 26rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.order--group--flex {
|
||||
@extend .order--flex;
|
||||
margin-bottom: $margin - 10;
|
||||
|
||||
&:last-child {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.order--group--header {
|
||||
padding-bottom: $margin;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
&>.logo {
|
||||
width: 38rpx;
|
||||
height: 38rpx;
|
||||
vertical-align: middle;
|
||||
margin-right: $margin/2;
|
||||
}
|
||||
|
||||
&>.store {
|
||||
@extend .text-nowrap;
|
||||
flex: 1;
|
||||
margin-right: $margin;
|
||||
font-size: 28rpx;
|
||||
line-height: 40rpx;
|
||||
color: #555;
|
||||
}
|
||||
|
||||
&>.stateText {
|
||||
font-size: 26rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.order--group--flex {
|
||||
@extend .order--flex;
|
||||
margin-bottom: $margin - 10;
|
||||
|
||||
&:last-child {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.flexrow {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
box-sizing: border-box;
|
||||
padding-top: $margin - 10;
|
||||
border-top: solid 1rpx #f9f9f9;
|
||||
margin-top: $margin - 10;
|
||||
}
|
||||
|
||||
.order--btns {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
|
||||
// padding-top: $margin - 10;
|
||||
&>.item {
|
||||
font-size: 26rpx;
|
||||
margin-left: $margin/2;
|
||||
color: #333;
|
||||
line-height: 56rpx;
|
||||
border: solid 1rpx #ddd;
|
||||
padding: 0 ($margin - 10);
|
||||
border-radius: 28rpx;
|
||||
|
||||
&--cancel,
|
||||
&--delete,
|
||||
&--logistic {
|
||||
color: #666;
|
||||
}
|
||||
|
||||
&--pay,
|
||||
&--sign {
|
||||
color: #34CE98;
|
||||
border-color: #34CE98;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -11,6 +11,9 @@
|
||||
<view class="price">
|
||||
<view class="money">{{item.active.price}} <span>DT积分</span> </view>
|
||||
<view class="now-pin" @click="goPin(item.goods_id)">马上拼团</view>
|
||||
</view>
|
||||
<view class="pin">
|
||||
拼
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -43,7 +46,19 @@
|
||||
background-color: white;
|
||||
border-radius: 10rpx;
|
||||
padding: $padding;
|
||||
margin-bottom: 20rpx;
|
||||
margin-bottom: 20rpx;
|
||||
position: relative;
|
||||
.pin{
|
||||
position: absolute;
|
||||
background-color: #22aa98;
|
||||
border-radius:0 0 30rpx 0;
|
||||
padding: 2rpx 30rpx 2rpx 30rpx;
|
||||
color: #fff;
|
||||
left: 0;
|
||||
top: 0;
|
||||
font-size: 28rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.goods-cover {
|
||||
width: 160rpx;
|
||||
@@ -53,7 +68,8 @@
|
||||
|
||||
.goods-info {
|
||||
width: calc(100% - 160rpx - 30rpx);
|
||||
padding-left: $padding;
|
||||
padding-left: $padding;
|
||||
|
||||
|
||||
._title {
|
||||
overflow: hidden;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"name" : "共力生态",
|
||||
"appid" : "__UNI__DE7B0E6",
|
||||
"description" : "共力生态",
|
||||
"versionName" : "1.0.43",
|
||||
"versionName" : "1.0.44",
|
||||
"versionCode" : 100,
|
||||
"transformPx" : false,
|
||||
/* 5+App特有相关 */
|
||||
@@ -67,7 +67,8 @@
|
||||
"<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
|
||||
],
|
||||
"autoSdkPermissions" : true
|
||||
"autoSdkPermissions" : true,
|
||||
"schemes" : "glst,gonglishengtai,gldao"
|
||||
},
|
||||
/* ios打包配置 */
|
||||
"ios" : {
|
||||
@@ -151,7 +152,10 @@
|
||||
"androidStyle" : "common"
|
||||
}
|
||||
},
|
||||
"nativePlugins" : {}
|
||||
"nativePlugins" : {},
|
||||
"uniStatistics" : {
|
||||
"enable" : true
|
||||
}
|
||||
},
|
||||
/* 快应用特有相关 */
|
||||
"quickapp" : {},
|
||||
@@ -161,19 +165,53 @@
|
||||
"setting" : {
|
||||
"urlCheck" : false
|
||||
},
|
||||
"usingComponents" : true
|
||||
"usingComponents" : true,
|
||||
"uniStatistics" : {
|
||||
"enable" : true
|
||||
}
|
||||
},
|
||||
"mp-alipay" : {
|
||||
"usingComponents" : true
|
||||
"usingComponents" : true,
|
||||
"uniStatistics" : {
|
||||
"enable" : true
|
||||
}
|
||||
},
|
||||
"mp-baidu" : {
|
||||
"usingComponents" : true
|
||||
"usingComponents" : true,
|
||||
"uniStatistics" : {
|
||||
"enable" : true
|
||||
}
|
||||
},
|
||||
"mp-toutiao" : {
|
||||
"usingComponents" : true
|
||||
"usingComponents" : true,
|
||||
"uniStatistics" : {
|
||||
"enable" : true
|
||||
}
|
||||
},
|
||||
"uniStatistics" : {
|
||||
"enable" : false
|
||||
"enable" : true
|
||||
},
|
||||
"vueVersion" : "2"
|
||||
"vueVersion" : "2",
|
||||
"h5" : {
|
||||
"uniStatistics" : {
|
||||
"enable" : true
|
||||
}
|
||||
},
|
||||
"mp-kuaishou" : {
|
||||
"uniStatistics" : {
|
||||
"enable" : true
|
||||
}
|
||||
},
|
||||
"mp-lark" : {
|
||||
"uniStatistics" : {
|
||||
"enable" : true
|
||||
}
|
||||
},
|
||||
"mp-qq" : {
|
||||
"uniStatistics" : {
|
||||
"enable" : true
|
||||
}
|
||||
},
|
||||
"fallbackLocale" : "zh-Hans",
|
||||
"locale" : "auto"
|
||||
}
|
||||
|
||||
2
node_modules/uview-ui/libs/config/config.js
generated
vendored
2
node_modules/uview-ui/libs/config/config.js
generated
vendored
@@ -3,7 +3,7 @@ const version = '2.0.31'
|
||||
|
||||
// 开发环境才提示,生产环境不会提示
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
console.log(`\n %c uView V${version} %c https://www.uviewui.com/ \n\n`, 'color: #ffffff; background: #3c9cff; padding:5px 0;', 'color: #3c9cff;background: #ffffff; padding:5px 0;');
|
||||
// console.log(`\n %c uView V${version} %c https://www.uviewui.com/ \n\n`, 'color: #ffffff; background: #3c9cff; padding:5px 0;', 'color: #3c9cff;background: #ffffff; padding:5px 0;');
|
||||
}
|
||||
|
||||
export default {
|
||||
|
||||
92
pages.json
92
pages.json
@@ -533,16 +533,16 @@
|
||||
"navigationBarTitleText": "公告详情",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationBarBackgroundColor": "#FFFFFF",
|
||||
"app-plus": {
|
||||
"titleNView": {
|
||||
"buttons": [{
|
||||
"text": "分享",
|
||||
"fontSize": "14",
|
||||
"width": "60px",
|
||||
"color": "#333"
|
||||
}]
|
||||
}
|
||||
}
|
||||
"app-plus": {
|
||||
"titleNView": {
|
||||
"buttons": [{
|
||||
"text": "分享",
|
||||
"fontSize": "14",
|
||||
"width": "60px",
|
||||
"color": "#333"
|
||||
}]
|
||||
}
|
||||
}
|
||||
}
|
||||
}, {
|
||||
"path": "pages/group-book/index",
|
||||
@@ -552,43 +552,51 @@
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
|
||||
}
|
||||
,{
|
||||
"path" : "pages/store/vip/index/index",
|
||||
"style" :
|
||||
{
|
||||
}, {
|
||||
"path": "pages/store/vip/index/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "***店铺会员",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
|
||||
}
|
||||
,{
|
||||
"path" : "pages/user/my-card/my-card",
|
||||
|
||||
}, {
|
||||
"path": "pages/user/my-card/my-card",
|
||||
"name": "MyCard",
|
||||
"style" :
|
||||
{
|
||||
"style": {
|
||||
"navigationBarTitleText": "我的卡券",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
|
||||
}
|
||||
,{
|
||||
"path" : "pages/group-book/success/success",
|
||||
"style" :
|
||||
{
|
||||
|
||||
}, {
|
||||
"path": "pages/group-book/success/success",
|
||||
"style": {
|
||||
"navigationBarTitleText": "拼单更多",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
|
||||
}
|
||||
,{
|
||||
"path" : "pages/store/vip-list/vip-list",
|
||||
|
||||
}, {
|
||||
"path": "pages/store/vip-list/vip-list",
|
||||
"name": "VipList",
|
||||
"style" :
|
||||
{
|
||||
"style": {
|
||||
"navigationBarTitleText": "VIP换购中心",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
}, {
|
||||
"path": "pages/group-book/list/list",
|
||||
"name":"PinList",
|
||||
"style": {
|
||||
"navigationBarTitleText": "拼团列表 ",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
}
|
||||
,{
|
||||
"path" : "pages/group-book/detail/detail",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText": "拼团详情",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
|
||||
}
|
||||
],
|
||||
"tabBar": {
|
||||
@@ -629,14 +637,12 @@
|
||||
"easycom": {
|
||||
"^u-(.*)": "uview-ui/components/u-$1/u-$1.vue"
|
||||
},
|
||||
"condition" : {
|
||||
"current": 0,
|
||||
"list": [
|
||||
{
|
||||
"name": "",
|
||||
"path": "",
|
||||
"query": ""
|
||||
}
|
||||
]
|
||||
"condition": {
|
||||
"current": 0,
|
||||
"list": [{
|
||||
"name": "",
|
||||
"path": "",
|
||||
"query": ""
|
||||
}]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,158 +31,189 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
smsAuth,
|
||||
getInvitationSms,
|
||||
keyAuth
|
||||
} from '@/apis/interfaces/auth.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
phone : '',
|
||||
code : '',
|
||||
parentId : '',
|
||||
getSms : false,
|
||||
sendCode : '获取验证码',
|
||||
isShowParent: false,
|
||||
isKeyAuth : false
|
||||
};
|
||||
},
|
||||
onShow () {
|
||||
uni.showLoading({
|
||||
title: '加载中...',
|
||||
mask : true
|
||||
})
|
||||
// 预登录
|
||||
uni.preLogin({
|
||||
provider: 'univerify',
|
||||
success: res => {
|
||||
this.isKeyAuth = true
|
||||
},
|
||||
complete() {
|
||||
uni.hideLoading()
|
||||
}
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
// 获取验证码
|
||||
getPhoneCode() {
|
||||
uni.showLoading({
|
||||
title : '加载中...',
|
||||
mask :true
|
||||
})
|
||||
let outTime;
|
||||
let smsTime = 60;
|
||||
getInvitationSms({
|
||||
mobileNo: this.phone,
|
||||
}).then(res => {
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: "none",
|
||||
});
|
||||
this.isShowParent = res.is_show_parent
|
||||
this.getSms = true;
|
||||
this.sendCode = smsTime + 's后重新获取';
|
||||
outTime = setInterval(() => {
|
||||
if (smsTime <= 1) {
|
||||
this.getSms = false;
|
||||
this.sendCode = '重新获取';
|
||||
clearInterval(outTime);
|
||||
return
|
||||
}
|
||||
this.sendCode = smsTime + 's后重新获取';
|
||||
smsTime -= 1;
|
||||
}, 1000);
|
||||
}).catch((err) => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon: "none",
|
||||
});
|
||||
});
|
||||
},
|
||||
// 登录
|
||||
login(type) {
|
||||
if (type === 'code') {
|
||||
uni.showLoading({
|
||||
title: '登录中'
|
||||
})
|
||||
smsAuth({
|
||||
mobileNo : this.phone,
|
||||
code : this.code,
|
||||
parent_id : this.parentId
|
||||
}).then((res) => {
|
||||
this.setAuthToken(res.token_type + ' ' + res.access_token, res.is_new)
|
||||
uni.hideLoading()
|
||||
}).catch((err) => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon: "none",
|
||||
});
|
||||
});
|
||||
return
|
||||
}
|
||||
if (type === 'Akey') {
|
||||
this.onKeyLogin()
|
||||
}
|
||||
},
|
||||
// 一键登录
|
||||
onKeyLogin(){
|
||||
uni.login({
|
||||
provider:'univerify',
|
||||
univerifyStyle:{
|
||||
icon: {
|
||||
path: require('@/static/logo.png')
|
||||
},
|
||||
authButton: {
|
||||
normalColor: '#34CE98',
|
||||
highlightColor: '#25b381',
|
||||
disabledColor: '#25b381'
|
||||
},
|
||||
otherLoginButton: {
|
||||
visible: false
|
||||
},
|
||||
privacyTerms: {
|
||||
termsColor: '#34CE98',
|
||||
uncheckedImage: require('@/static/icon/unchecked-icon.png'),
|
||||
checkedImage: require('@/static/icon/checked-icon.png')
|
||||
}
|
||||
},
|
||||
success: Result => {
|
||||
if(Result.errMsg === 'login:ok'){
|
||||
let {access_token, openid} = Result.authResult
|
||||
keyAuth({
|
||||
access_token,
|
||||
openid
|
||||
}).then(res => {
|
||||
this.setAuthToken(res.token_type + ' ' + res.access_token, res.is_new)
|
||||
uni.closeAuthView()
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: '登录失败:' + err.message,
|
||||
icon : 'none'
|
||||
})
|
||||
uni.closeAuthView()
|
||||
})
|
||||
}
|
||||
},
|
||||
fail: err => {
|
||||
console.log(err)
|
||||
}
|
||||
})
|
||||
},
|
||||
// setToken
|
||||
setAuthToken(token, isNew){
|
||||
this.$store.commit('setToken', token);
|
||||
if(isNew){
|
||||
uni.setStorageSync('isnew', 0)
|
||||
this.$Router.replace({name: 'AuthRole'})
|
||||
return
|
||||
}
|
||||
uni.setStorageSync('isnew', 1)
|
||||
this.$Router.pushTab({name: 'Life'})
|
||||
}
|
||||
}
|
||||
}
|
||||
import {
|
||||
smsAuth,
|
||||
getInvitationSms,
|
||||
keyAuth
|
||||
} from '@/apis/interfaces/auth.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
phone: '',
|
||||
code: '',
|
||||
parentId: '', // 父类邀请码
|
||||
getSms: false,
|
||||
sendCode: '获取验证码',
|
||||
isShowParent: false,
|
||||
isKeyAuth: false,
|
||||
shareId: ''
|
||||
};
|
||||
},
|
||||
onShow() {
|
||||
setTimeout(() => {
|
||||
if (plus.runtime.arguments.split('?')[1]) {
|
||||
let args = plus.runtime.arguments.split('?')[1]
|
||||
this.shareId = args.split('invitation')[0]
|
||||
this.parentId = args.split('invitation')[1]
|
||||
}
|
||||
}, 100);
|
||||
|
||||
uni.showLoading({
|
||||
title: '加载中...',
|
||||
mask: true
|
||||
})
|
||||
// 预登录
|
||||
uni.preLogin({
|
||||
provider: 'univerify',
|
||||
success: res => {
|
||||
this.isKeyAuth = true
|
||||
},
|
||||
complete() {
|
||||
uni.hideLoading()
|
||||
}
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
// 获取验证码
|
||||
getPhoneCode() {
|
||||
uni.showLoading({
|
||||
title: '加载中...',
|
||||
mask: true
|
||||
})
|
||||
let outTime;
|
||||
let smsTime = 60;
|
||||
getInvitationSms({
|
||||
mobileNo: this.phone,
|
||||
}).then(res => {
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: "none",
|
||||
});
|
||||
this.isShowParent = res.is_show_parent
|
||||
this.getSms = true;
|
||||
this.sendCode = smsTime + 's后重新获取';
|
||||
outTime = setInterval(() => {
|
||||
if (smsTime <= 1) {
|
||||
this.getSms = false;
|
||||
this.sendCode = '重新获取';
|
||||
clearInterval(outTime);
|
||||
return
|
||||
}
|
||||
this.sendCode = smsTime + 's后重新获取';
|
||||
smsTime -= 1;
|
||||
}, 1000);
|
||||
}).catch((err) => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon: "none",
|
||||
});
|
||||
});
|
||||
},
|
||||
// 登录
|
||||
login(type) {
|
||||
if (type === 'code') {
|
||||
uni.showLoading({
|
||||
title: '登录中'
|
||||
})
|
||||
smsAuth({
|
||||
mobileNo: this.phone,
|
||||
code: this.code,
|
||||
parent_id: this.parentId
|
||||
}).then((res) => {
|
||||
this.setAuthToken(res.token_type + ' ' + res.access_token, res.is_new)
|
||||
uni.hideLoading()
|
||||
}).catch((err) => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon: "none",
|
||||
});
|
||||
});
|
||||
return
|
||||
}
|
||||
if (type === 'Akey') {
|
||||
this.onKeyLogin()
|
||||
}
|
||||
},
|
||||
// 一键登录
|
||||
onKeyLogin() {
|
||||
uni.login({
|
||||
provider: 'univerify',
|
||||
univerifyStyle: {
|
||||
icon: {
|
||||
path: require('@/static/logo.png')
|
||||
},
|
||||
authButton: {
|
||||
normalColor: '#34CE98',
|
||||
highlightColor: '#25b381',
|
||||
disabledColor: '#25b381'
|
||||
},
|
||||
otherLoginButton: {
|
||||
visible: false
|
||||
},
|
||||
privacyTerms: {
|
||||
termsColor: '#34CE98',
|
||||
uncheckedImage: require('@/static/icon/unchecked-icon.png'),
|
||||
checkedImage: require('@/static/icon/checked-icon.png')
|
||||
}
|
||||
},
|
||||
success: Result => {
|
||||
if (Result.errMsg === 'login:ok') {
|
||||
let {
|
||||
access_token,
|
||||
openid
|
||||
} = Result.authResult
|
||||
keyAuth({
|
||||
access_token,
|
||||
openid
|
||||
}).then(res => {
|
||||
this.setAuthToken(res.token_type + ' ' + res.access_token, res
|
||||
.is_new)
|
||||
uni.closeAuthView()
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: '登录失败:' + err.message,
|
||||
icon: 'none'
|
||||
})
|
||||
uni.closeAuthView()
|
||||
})
|
||||
}
|
||||
},
|
||||
fail: err => {
|
||||
console.log(err)
|
||||
}
|
||||
})
|
||||
},
|
||||
// setToken
|
||||
setAuthToken(token, isNew) {
|
||||
this.$store.commit('setToken', token);
|
||||
if (isNew) {
|
||||
uni.setStorageSync('isnew', 0)
|
||||
this.$Router.replace({
|
||||
name: 'AuthRole',
|
||||
params: {
|
||||
shareId: this.shareId
|
||||
}
|
||||
})
|
||||
return
|
||||
}
|
||||
uni.setStorageSync('isnew', 1)
|
||||
if (this.shareId != '' && this.shareId != undefined) {
|
||||
setTimeout(() => {
|
||||
uni.hideLoading()
|
||||
plus.runtime.arguments = null;
|
||||
plus.runtime.arguments = '';
|
||||
uni.reLaunch({
|
||||
url: '/pages/group-book/success/success?access=1&id=' + this.shareId
|
||||
})
|
||||
}, 1000)
|
||||
} else {
|
||||
this.$Router.pushTab({
|
||||
name: 'Life'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
@@ -71,7 +71,19 @@
|
||||
storage_id : this.storageId
|
||||
}).then(res => {
|
||||
uni.setStorageSync('isnew', 1)
|
||||
this.$Router.pushTab({name: 'Life'})
|
||||
if(this.$Route.query.shareId!='' && this.$Route.query.shareId != undefined){
|
||||
setTimeout(() => {
|
||||
uni.hideLoading()
|
||||
plus.runtime.arguments = null;
|
||||
plus.runtime.arguments = '';
|
||||
uni.reLaunch({
|
||||
url: '/pages/group-book/success/success?access=1&id=' + this.$Route.query.shareId
|
||||
})
|
||||
}, 1000)
|
||||
}else{
|
||||
this.$Router.pushTab({name: 'Life'})
|
||||
}
|
||||
uni.setStorageSync('isnew', 1)
|
||||
}).catch(err => {
|
||||
this.disabled = false
|
||||
uni.showToast({
|
||||
|
||||
BIN
pages/group-book/.DS_Store
vendored
Normal file
BIN
pages/group-book/.DS_Store
vendored
Normal file
Binary file not shown.
416
pages/group-book/detail/detail.vue
Normal file
416
pages/group-book/detail/detail.vue
Normal file
@@ -0,0 +1,416 @@
|
||||
<template>
|
||||
<view class="pin-detail">
|
||||
<view class="goods">
|
||||
<image class="cover" :src="goods.cover" mode="aspectFill" />
|
||||
<view class="info">
|
||||
<view class="title">{{goods.name}} </view>
|
||||
<view class="subtitle">
|
||||
<view class="hasPined" v-if="collage.sale>0">
|
||||
<image src="/static/store/fire.png" mode="widthFix" />已拼{{collage.sale}}件
|
||||
</view>
|
||||
<view class="tuan">{{collage.number}}人团</view>
|
||||
</view>
|
||||
<view class="price">
|
||||
<view class="now">{{goods.price}}<span>DT积分</span></view>
|
||||
<view class="old"> {{goods.cost}}积分 </view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="pin">
|
||||
<view class="title">
|
||||
<block v-if="collage.down>0 && collage.status == 3">
|
||||
<u-count-down :time="collage.down" format="DD:HH:mm:ss" autoStart millisecond @change="onChange">
|
||||
</u-count-down>
|
||||
距离结束<span>{{ timeData.days }}</span> 天
|
||||
<span>{{ timeData.hours>10?timeData.hours:'0'+timeData.hours}} </span>小时<span>{{ timeData.minutes }} </span>分钟<span>{{ timeData.seconds }} </span>秒
|
||||
</block>
|
||||
<block v-if="collage.status != 3">
|
||||
<span>{{collage.status_text}}</span>
|
||||
</block>
|
||||
</view>
|
||||
<view class="avatars">
|
||||
<block>
|
||||
<image v-for="(item,index) in users" :key='index+1' :class="['avatar',item.master?'pin':''] " :src="item" mode="aspectFill" />
|
||||
</block>
|
||||
<block v-if="collage.surplus>0">
|
||||
<image v-for="(item,index) in collage.surplus" :key='index+2' class="wen" src="/static/book/wen.png" mode="aspectFill" />
|
||||
</block>
|
||||
</view>
|
||||
<view class="title" v-if="collage.sale>0">已拼<span>{{collage.sale}}</span>人</view>
|
||||
<view class="progress">
|
||||
{{collage.number - collage.surplus}}人
|
||||
<u-line-progress activeColor="#34ce98" class="line" :percentage="collage.score" :showText="false" />
|
||||
{{collage.number}}人
|
||||
</view>
|
||||
</view>
|
||||
<view class="warn" v-if="collage.status == 3 || collage.status == 2">完成支付后,需在24小时内邀请好友参加拼团,否则拼团失败,自动退款</view>
|
||||
|
||||
<view class="order" v-if="orderDetail.order_no != ''">
|
||||
<view class="title">订单详情</view>
|
||||
<view class="order-item">
|
||||
<view class="order-item-title">订单编号:</view>
|
||||
<view class="order-item-detail">{{orderDetail.order_no}}</view>
|
||||
</view>
|
||||
<view class="order-item">
|
||||
<view class="order-item-title">下单时间:</view>
|
||||
<view class="order-item-detail">{{orderDetail.created_at}}</view>
|
||||
</view>
|
||||
<view class="order-item">
|
||||
<view class="order-item-title">支付时间:</view>
|
||||
<view class="order-item-detail">{{orderDetail.paid_at}}</view>
|
||||
</view>
|
||||
<view class="order-item" v-if="collage.status == 1&& express.deliver_at">
|
||||
<view class="order-item-title">发货时间:</view>
|
||||
<view class="order-item-detail">{{ express.deliver_at || '--'}}</view>
|
||||
</view>
|
||||
<view class="order-item" v-if="collage.status == 1 && express.receive_at">
|
||||
<view class="order-item-title">签收时间:</view>
|
||||
<view class="order-item-detail">{{ express.receive_at || '--'}}</view>
|
||||
</view>
|
||||
<view class="order-item">
|
||||
<view class="order-item-title">支付方式:</view>
|
||||
<view class="order-item-detail">DT支付</view>
|
||||
</view>
|
||||
<view class="order-item">
|
||||
<view class="order-item-title">备注信息:</view>
|
||||
<view class="order-item-detail">{{orderDetail.remark || '--'}}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="btn" v-if="collage.status == 1 && can">
|
||||
<view v-if="can.logistic_show" @click="onBtn('logistic')" class="btn-item"> 查看物流 </view>
|
||||
<view v-if="can.sign" @click="onBtn('sign')" class="btn-item success"> 确认签收 </view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
myPinDetail
|
||||
} from '@/apis/interfaces/pin.js'
|
||||
import { sign } from '@/apis/interfaces/order'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
orderDetail: {},
|
||||
goods: {},
|
||||
collage: {},
|
||||
users: [],
|
||||
timeData: {},
|
||||
express: {},
|
||||
can: {}
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
this.getInfo()
|
||||
},
|
||||
methods: {
|
||||
getInfo(){
|
||||
myPinDetail(this.$Route.query.id).then(res => {
|
||||
this.orderDetail = res.order_detail;
|
||||
this.goods = res.item;
|
||||
let collage = res.collage;
|
||||
collage.score = 100
|
||||
this.collage = collage;
|
||||
this.users = res.users;
|
||||
this.express = res.order_detail.express;
|
||||
this.can = res.order_detail.can;
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon: "none",
|
||||
mask: true,
|
||||
duration: 3000
|
||||
})
|
||||
})
|
||||
},
|
||||
onChange(e) {
|
||||
this.timeData = e
|
||||
},
|
||||
onBtn(type) {
|
||||
switch (type) {
|
||||
case 'logistic':
|
||||
this.$Router.push({
|
||||
name: 'OrderLogistics',
|
||||
params: {
|
||||
orderNo: this.orderDetail.order_no,
|
||||
},
|
||||
});
|
||||
break;
|
||||
case 'sign':
|
||||
uni.showModal({
|
||||
title: '温馨提示',
|
||||
content: '是否确认收到货物并签收该订单',
|
||||
confirmText: '确认签收',
|
||||
confirmColor: "#34CE98",
|
||||
cancelText: '再想想',
|
||||
cancelColor: "#666666",
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
sign(this.orderDetail.order_no).then(res => {
|
||||
this.getInfo();
|
||||
return;
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon: 'none'
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.pin-detail {
|
||||
background-color: $window-color;
|
||||
min-height: 100vh;
|
||||
position: relative;
|
||||
|
||||
.goods {
|
||||
padding: $padding;
|
||||
border-top: solid 20rpx #f9f9f9;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-sizing: border-box;
|
||||
background-color: #fff;
|
||||
|
||||
.cover {
|
||||
width: 200rpx;
|
||||
height: 200rpx;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
|
||||
.info {
|
||||
flex: 1;
|
||||
margin-left: 20rpx;
|
||||
font-size: 32rpx;
|
||||
|
||||
.title {
|
||||
font-size: 32rpx;
|
||||
color: #454545;
|
||||
}
|
||||
|
||||
.subtitle {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
box-sizing: border-box;
|
||||
color: #999;
|
||||
font-size: 26rpx;
|
||||
margin-top: 20rpx;
|
||||
|
||||
.hasPined {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
box-sizing: border-box;
|
||||
color: #d81e06;
|
||||
background-color: rgba(255, 0, 0, .1);
|
||||
padding: 4rpx 24rpx;
|
||||
border-radius: 30rpx;
|
||||
|
||||
image {
|
||||
width: 34rpx;
|
||||
height: 34rpx;
|
||||
margin: 6rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.tuan {
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.price {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
box-sizing: border-box;
|
||||
margin-top: 20rpx;
|
||||
margin-left: 10rpx;
|
||||
|
||||
.now {
|
||||
font-size: 38rpx;
|
||||
font-weight: bold;
|
||||
color: #d81e06;
|
||||
|
||||
span {
|
||||
font-weight: normal;
|
||||
font-size: 24rpx;
|
||||
padding-left: 4rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.old {
|
||||
font-weight: normal;
|
||||
font-size: 26rpx;
|
||||
color: #999;
|
||||
margin-left: 30rpx;
|
||||
text-decoration: line-through;
|
||||
padding-top: 16rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.pin {
|
||||
margin-top: $margin - 10;
|
||||
background-color: #fff;
|
||||
padding: $padding;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-sizing: border-box;
|
||||
|
||||
.title {
|
||||
font-size: 30rpx;
|
||||
color: #454545;
|
||||
|
||||
span {
|
||||
color: #d81e06;
|
||||
font-size: 36rpx;
|
||||
font-weight: bold;
|
||||
padding: 0 6rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.progress {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-sizing: border-box;
|
||||
color: #454545;
|
||||
font-size: 28rpx;
|
||||
margin-top: $margin*2 - 20;
|
||||
|
||||
.line {
|
||||
flex: 1;
|
||||
margin: 0 $margin - 10;
|
||||
}
|
||||
}
|
||||
|
||||
.avatars {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
margin-top: $margin;
|
||||
|
||||
image {
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
// padding: 20rpx;
|
||||
border-radius: 50%;
|
||||
margin: 10rpx 20rpx;
|
||||
border: solid 2rpx #f9f9f9;
|
||||
}
|
||||
|
||||
.pin {
|
||||
position: relative;
|
||||
|
||||
&::after {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
content: '拼主';
|
||||
background: orange;
|
||||
padding: 4rpx 0;
|
||||
font-size: 20rpx;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.warn {
|
||||
text-align: center;
|
||||
padding: $padding - 10 $padding + 20;
|
||||
color: grey;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
|
||||
.order {
|
||||
background-color: #fff;
|
||||
padding: $padding;
|
||||
margin-top: 20rpx;
|
||||
padding-bottom: 150rpx;
|
||||
|
||||
.title {
|
||||
font-size: 32rpx;
|
||||
color: #454545;
|
||||
font-weight: bold;
|
||||
border-bottom: solid 1rpx #f9f9f9;
|
||||
padding-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.order-item {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
;
|
||||
box-sizing: border-box;
|
||||
color: #454545;
|
||||
padding: $padding 0;
|
||||
border-bottom: solid 1rpx #f9f9f9;
|
||||
|
||||
.order-item-title {
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.order-item-detail {
|
||||
font-size: 30rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btn {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
background-color: #fff;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
box-sizing: border-box;
|
||||
padding: 0 $padding + 20 $padding $padding + 20;
|
||||
|
||||
.btn-item {
|
||||
font-size: 26rpx;
|
||||
margin-left: $margin/2;
|
||||
color: #333;
|
||||
line-height: 56rpx;
|
||||
border: solid 1rpx #ddd;
|
||||
padding: 0 ($margin - 10);
|
||||
border-radius: 28rpx;
|
||||
display: inline-block;
|
||||
margin-top: $margin;
|
||||
}
|
||||
|
||||
.success {
|
||||
color: #34CE98;
|
||||
border-color: #34CE98;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
215
pages/group-book/list/list.vue
Normal file
215
pages/group-book/list/list.vue
Normal file
@@ -0,0 +1,215 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<!-- tabs -->
|
||||
<u-sticky>
|
||||
<u-tabs class="tabs" :list="tabs" :scrollable="false" :current="index" lineColor="#34CE98" @click="onTabs"
|
||||
sticky />
|
||||
</u-sticky>
|
||||
<block v-if="array.length >= 1">
|
||||
<!-- 订单列表 -->
|
||||
<orderPin v-for="(item, arrayIndex) in array" :key="arrayIndex" :order-info="item" @onBtn="onType" />
|
||||
<!-- 加载更多 -->
|
||||
<view class="pages-load">
|
||||
<u-loadmore :status="status" />
|
||||
</view>
|
||||
</block>
|
||||
<block v-else>
|
||||
<view class="vertical order-null">
|
||||
<u-empty mode="order" icon="http://cdn.uviewui.com/uview/empty/order.png" text="暂无相关订单"
|
||||
textColor="#999" />
|
||||
</view>
|
||||
</block>
|
||||
|
||||
<!-- 分享 -->
|
||||
<uni-popup ref="popupShare" type="share" background-color="#fff">
|
||||
<uni-popup-share title="立即分享到" @select="select" />
|
||||
</uni-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
orders,
|
||||
del,
|
||||
cancel,
|
||||
sign
|
||||
} from '@/apis/interfaces/order'
|
||||
import {
|
||||
myPinList
|
||||
} from '@/apis/interfaces/pin'
|
||||
import eventBus from '../../../utils/eventBus.js';
|
||||
import orderPin from '@/components/oct-order-pin/index.vue'
|
||||
export default {
|
||||
components: {
|
||||
orderPin
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
status: "loading",
|
||||
tabs: [{
|
||||
name: "全部",
|
||||
type: "",
|
||||
},
|
||||
{
|
||||
name: "拼团中",
|
||||
type: "3",
|
||||
},
|
||||
{
|
||||
name: "拼团成功",
|
||||
type: "1",
|
||||
},
|
||||
{
|
||||
name: "拼团失败",
|
||||
type: "2",
|
||||
}
|
||||
],
|
||||
index: '0',
|
||||
array: [],
|
||||
page: 1,
|
||||
shareInfo: {},
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
this.getOrder()
|
||||
},
|
||||
onShow() {
|
||||
if (this.$store.getters.getRefresh == 1) {
|
||||
this.$store.commit('setRefresh', 0)
|
||||
this.array = []
|
||||
this.page = 1
|
||||
this.getOrder()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getOrder() {
|
||||
myPinList({
|
||||
state: this.tabs[this.index].type,
|
||||
page: this.page
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
if (res.page.current === 1) {
|
||||
this.array = []
|
||||
}
|
||||
let ordersArr = res.data.map(val => {
|
||||
return {
|
||||
no: val.order_no,
|
||||
cover: val.item.cover,
|
||||
name: val.item.name,
|
||||
price: val.item.price,
|
||||
sum: 1,
|
||||
collage: val.collage,
|
||||
shop: val.shop,
|
||||
goods_id: val.item.goods_id,
|
||||
unit: val.item.unit,
|
||||
users: val.users,
|
||||
invite: val.invite,
|
||||
order: val.order,
|
||||
url: val.url
|
||||
}
|
||||
})
|
||||
this.array = this.array.concat(ordersArr)
|
||||
this.status = res.page.has_more ? 'loadmore' : 'nomore'
|
||||
})
|
||||
},
|
||||
onTabs(e) {
|
||||
this.page = 1
|
||||
this.index = e.index
|
||||
this.getOrder()
|
||||
},
|
||||
|
||||
onType(e) {
|
||||
let orderNo = e.order.no;
|
||||
let shopId = e.order.shop.shop_id;
|
||||
let goodsId = e.order.goods_id;
|
||||
switch (e.type) {
|
||||
case 'share':
|
||||
this.shareInfo = e.order
|
||||
this.$refs.popupShare.open();
|
||||
console.log('触发分享', this.shareInfo)
|
||||
break;
|
||||
case 'goInfo':
|
||||
uni.navigateTo({
|
||||
url:'/pages/group-book/detail/detail?id='+e.order.no
|
||||
})
|
||||
break;
|
||||
}
|
||||
},
|
||||
// 分享选项
|
||||
select(e) {
|
||||
console.log(this.shareInfo.url + this.shareInfo.collage.collage_id + 'invitation' + this
|
||||
.shareInfo.invite, this.shareInfo.collage.surplus, this.shareInfo.cover, this.shareInfo.name)
|
||||
switch (e.item.name) {
|
||||
case 'wxchum':
|
||||
uni.share({
|
||||
provider: 'weixin',
|
||||
scene: 'WXSceneSession',
|
||||
type: 0,
|
||||
href: this.shareInfo.url + this.shareInfo.collage.collage_id + 'invitation' + this
|
||||
.shareInfo.invite,
|
||||
title: '【仅剩' + this.shareInfo.collage.surplus + '个名额】邀请您一起拼团',
|
||||
summary: '好货不用一分钱,点点就能带回家【 ' + this.shareInfo.name + '】',
|
||||
imageUrl: this.shareInfo.cover,
|
||||
fail: (err) => {
|
||||
uni.showToast({
|
||||
title: err.errMsg,
|
||||
icon: 'none'
|
||||
})
|
||||
},
|
||||
success: (res) => {
|
||||
this.shareInfo = {}
|
||||
}
|
||||
})
|
||||
break;
|
||||
case 'wxcircle':
|
||||
uni.share({
|
||||
provider: 'weixin',
|
||||
scene: 'WXSceneTimeline',
|
||||
type: 0,
|
||||
href: this.shareInfo.url + this.shareInfo.collage.collage_id + 'invitation' + this
|
||||
.shareInfo.invite,
|
||||
summary: '好货不用一分钱,点点就能带回家【 ' + this.shareInfo.name + '】',
|
||||
imageUrl: this.shareInfo.cover,
|
||||
fail: (err) => {
|
||||
uni.showToast({
|
||||
title: err.errMsg,
|
||||
icon: 'none'
|
||||
})
|
||||
},
|
||||
success: (res) => {
|
||||
this.shareInfo = {}
|
||||
}
|
||||
})
|
||||
break;
|
||||
}
|
||||
},
|
||||
},
|
||||
onReachBottom() {
|
||||
if (this.status === 'loadmore') {
|
||||
this.page += 1
|
||||
this.status = 'loading'
|
||||
this.getOrder()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.content {
|
||||
background: $window-color;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
.tabs {
|
||||
background: white;
|
||||
}
|
||||
|
||||
// 数据列表空
|
||||
.order-null {
|
||||
height: 80vh;
|
||||
}
|
||||
|
||||
// 加载分页
|
||||
.pages-load {
|
||||
padding-bottom: $padding;
|
||||
}
|
||||
</style>
|
||||
@@ -1,17 +1,22 @@
|
||||
<template>
|
||||
<view class="pinSuccess">
|
||||
<view class="count-down">
|
||||
<u-count-down ref="countDown" :time="downTime" format="HH:mm:ss" :autoStart="true" millisecond/>
|
||||
<view class="count-down" v-if="downTime>0">
|
||||
<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="title" v-if="surplus>0"> 还差 <span>{{surplus}}</span> 人,赶紧邀请好友来拼单吧 </view>
|
||||
<block v-if="share.status == 3">
|
||||
<view class="btn invite" v-if="!share.can_share " @click="onTake"> 参与该拼单 </view>
|
||||
<view class="btn invite" v-if="share.can_share" @click="onShare"> 邀请好友拼单 </view>
|
||||
</block>
|
||||
<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 v-for="(item,index) in details" :key='index+1' :class="['avatar',item.master?'pin':''] " :src="item.cover" mode="aspectFill" />
|
||||
</block>
|
||||
<block v-if="surplus>0">
|
||||
<image v-for="(item,index) in surplus" :key='index+2' class="wen" src="/static/book/wen.png" mode="aspectFill" />
|
||||
</block>
|
||||
<image class="wen" src="/static/book/wen.png" mode="aspectFill" />
|
||||
</view>
|
||||
<block>
|
||||
<view class="orderInfo">
|
||||
@@ -22,13 +27,17 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="orderInfo">
|
||||
<view class="left"> 拼单规则 </view>
|
||||
<view class="left">拼单规则</view>
|
||||
<view class="right">
|
||||
<view class="right-title">人满发货 · 人不满退款 · 只能拼一次 </view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
<!-- 分享 -->
|
||||
<uni-popup ref="popupShare" type="share" background-color="#fff">
|
||||
<uni-popup-share title="立即分享到" @select="select" />
|
||||
</uni-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -42,53 +51,108 @@
|
||||
goodName: '',
|
||||
details: [],
|
||||
downTime: 0,
|
||||
surplus: 1,
|
||||
order: {}, // order 是{} 标识不是我的订单,否则就是我的订单可以跳转订单详情
|
||||
surplus: 0,
|
||||
goods: {}, // order 是{} 标识不是我的订单,否则就是我的订单可以跳转订单详情
|
||||
share:{},
|
||||
access: '0', // 参与别人的1 自己的分享的0 后来想想这个接口作用不大了 ~ 闹挺 ~ 所以这个字段暂时不用,用后端返回的新字段来区分是自己的拼单还是别人的拼单;
|
||||
};
|
||||
},
|
||||
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
|
||||
})
|
||||
this.access = this.$Route.query.access
|
||||
repages(this.$Route.query.id,{invite:this.invite}).then(res => {
|
||||
this.share = res.share
|
||||
this.goods = res.goods
|
||||
this.goodName = res.goods.name
|
||||
this.surplus = res.share.surplus
|
||||
this.details = res.share.details
|
||||
this.downTime = res.share.down * 1000
|
||||
uni.setNavigationBarTitle({
|
||||
title:res.share.status_text
|
||||
})
|
||||
}).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: {
|
||||
onHide() {
|
||||
try {
|
||||
if (this.$refs.countDown) {
|
||||
this.$refs.countDown.pause()
|
||||
}
|
||||
} catch (err) {
|
||||
uni.showToast({
|
||||
title: err,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 参与拼单
|
||||
onTake(){
|
||||
console.log()
|
||||
uni.navigateTo({
|
||||
url: '/pages/store/goods?id=' + this.goods.goods_id+'&shareId='+this.share.collage_id ,// shareId 代表当前商品详情下面拼单有带 id
|
||||
})
|
||||
},
|
||||
// 分享
|
||||
onShare() {
|
||||
this.$refs.popupShare.open();
|
||||
},
|
||||
|
||||
// 分享选项
|
||||
select(e) {
|
||||
switch (e.item.name) {
|
||||
case 'wxchum':
|
||||
uni.share({
|
||||
provider: 'weixin',
|
||||
scene: 'WXSceneSession',
|
||||
type: 0,
|
||||
href: this.share.url + this.share.collage_id+'invitation'+this.share.invite.invite,
|
||||
title: '【仅剩' + this.surplus +'个名额】邀请您一起拼团',
|
||||
summary: '好货不用一分钱,点点就能带回家【 ' + this.goods.name + '】',
|
||||
imageUrl: this.goods.cover,
|
||||
fail(err) {
|
||||
uni.showToast({
|
||||
title: err.errMsg,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
})
|
||||
break;
|
||||
case 'wxcircle':
|
||||
uni.share({
|
||||
provider: 'weixin',
|
||||
scene: 'WXSceneTimeline',
|
||||
type: 0,
|
||||
href: this.share.url + this.share.collage_id+'invitation'+this.share.invite.invite,
|
||||
summary: '好货不用一分钱,点点就能带回家【 ' + this.goods.name + '】',
|
||||
imageUrl: this.goods.cover,
|
||||
fail(err) {
|
||||
uni.showToast({
|
||||
title: err.errMsg,
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
})
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
// 返回首页
|
||||
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('是我的跳转订单详情')
|
||||
}
|
||||
},
|
||||
// 商品详情
|
||||
goDetail() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/store/goods?id=' + this.goods.goods_id
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -139,7 +203,7 @@
|
||||
|
||||
.index {
|
||||
background-color: rgba($color: #fff, $alpha: 1.0);
|
||||
color: $main-color;
|
||||
color: $main-color;
|
||||
}
|
||||
|
||||
.goodInfo {
|
||||
@@ -210,7 +274,7 @@
|
||||
justify-content: space-between;
|
||||
box-sizing: border-box;
|
||||
padding: 30rpx 0;
|
||||
font-size: 26rpx;
|
||||
font-size: 28rpx;
|
||||
color: #666;
|
||||
border-bottom: solid 1rpx #f9f9f9;
|
||||
|
||||
@@ -222,7 +286,7 @@
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
|
||||
.right-title {
|
||||
margin-right: 10rpx;
|
||||
|
||||
@@ -197,7 +197,9 @@
|
||||
cancelColor: "#666666",
|
||||
success: (res) => {
|
||||
if(res.confirm){
|
||||
console.log('挑战到我的拼单列表')
|
||||
uni.navigateTo({
|
||||
url:'/pages/group-book/list/list'
|
||||
})
|
||||
} if(res.cancel){
|
||||
uni.navigateTo({
|
||||
url:'/pages/store/index'
|
||||
|
||||
BIN
pages/store/.DS_Store
vendored
Normal file
BIN
pages/store/.DS_Store
vendored
Normal file
Binary file not shown.
@@ -3,33 +3,34 @@
|
||||
<!-- 产品封面 -->
|
||||
<view class="goods-swiper">
|
||||
<swiper :indicator-dots="false" @change="current = $event.detail.current + 1">
|
||||
<swiper-item v-for="(item, index) in goods.pictures" :key="index">
|
||||
<swiper-item v-for="(item, index) in goods.pictures" :key="index+1">
|
||||
<view class="swiper-cover">
|
||||
<image :src="item" mode="aspectFill" />
|
||||
</view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
<view class="swiper-pages"> {{current}}/{{goods.pictures.length}}</view>
|
||||
<view class="swiper-pages"> {{current}}/{{goods.pictures.length}}</view>
|
||||
<!-- vip 商品提示 -->
|
||||
<view class="vipGoodsInfo" v-if="shop_vip.status" >{{shop_vip.message}} </view>
|
||||
<view class="vipGoodsInfo" v-if="shop_vip.status">{{shop_vip.message}} </view>
|
||||
<!-- 拼团 商品标题上面提示 -->
|
||||
<view class="vipGoodsInfo" v-if="goods.is_active " >拼团商品</view>
|
||||
<view class="vipGoodsInfo" v-if="goods.is_active ">拼团商品</view>
|
||||
</view>
|
||||
<!-- 详情 -->
|
||||
<view class="main">
|
||||
<view class="title"> {{goods.name}} </view>
|
||||
<view class="sub-title">
|
||||
<!-- vip 商品前边 tags -->
|
||||
<span class='vipType' v-if="shop_vip.messageTitle != ''">{{shop_vip.messageTitle}}</span>{{goods.description}}
|
||||
<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>
|
||||
<span class ='del' v-if="shop_vip.status">{{goods.original_price}} DT积分</span>
|
||||
</view>
|
||||
<span class='del' v-if="shop_vip.status">{{goods.original_price}} DT积分</span>
|
||||
</view>
|
||||
<!-- vip 商品及普通商品展示库存量 -->
|
||||
<view class="sales" v-if="goods.skus && !goods.is_active">库存量{{goods.skus[0].stock}}件</view>
|
||||
<view class="sales" v-if="goods.skus && !goods.is_active">库存量{{goods.skus[0].stock}}件</view>
|
||||
<!-- 拼团商品展示已拼数量及参团数 -->
|
||||
<view class="_pin" v-if="goods.is_active">
|
||||
<view class="_has" v-if="goods.active.count>0">
|
||||
@@ -47,7 +48,7 @@
|
||||
<view class=" des"> {{shop_vip.card.description}} </view>
|
||||
</view>
|
||||
<view class="btn" @click="toVip">
|
||||
<!-- 1 开通 2续费 3升级 number 类型 -->
|
||||
<!-- 1 开通 2续费 3升级 number 类型 -->
|
||||
查看详情
|
||||
<!-- {{shop_vip.card.state === 1 ?'立即开通':shop_vip.card.state === 2 ?'立即续费':'立即升级'}} -->
|
||||
</view>
|
||||
@@ -59,7 +60,7 @@
|
||||
</view>
|
||||
|
||||
<!-- 可拼团列表 -->
|
||||
<view class="is_active" v-if="goods.is_active && collages.length>0">
|
||||
<view class="is_active" v-if="goods.is_active && collages.length>0 && shareId == ''">
|
||||
<view class="title" v-if="collages.length > 2">
|
||||
这些人刚刚拼单成功,可参与拼单
|
||||
<span @click="getMorePin = true">查看更多
|
||||
@@ -74,7 +75,8 @@
|
||||
<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="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>
|
||||
@@ -100,7 +102,7 @@
|
||||
|
||||
<!-- 商品详情 -->
|
||||
<view class="imgs">
|
||||
<u-notice-bar v-if="shop_vip.status" text="戒指尺寸有大小,请购买戒指时参照详情介绍,备注所选尺寸" fontSize='14' />
|
||||
<u-notice-bar v-if="shop_vip.status" text="戒指尺寸有大小,请在购买戒指时参照详情介绍备注所选尺寸" fontSize='14' />
|
||||
<block v-for="(item, index) in goods.content" :key="index">
|
||||
<image :src="item" mode="widthFix" />
|
||||
</block>
|
||||
@@ -109,12 +111,14 @@
|
||||
|
||||
<!-- 立即购买 shop_vip.status 区分是否是 vip 商品 否则的就却分是拼团商品还是普通商品 -->
|
||||
<view class="footer">
|
||||
<view @click="toShop(goods.shop.shop_id)" class="shop"> <uni-icons type="shop" size="26" color="grey" />店铺 </view>
|
||||
<view @click="toShop(goods.shop.shop_id)" class="shop">
|
||||
<uni-icons type="shop" size="26" color="grey" />店铺
|
||||
</view>
|
||||
<!-- 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">
|
||||
<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>
|
||||
@@ -132,7 +136,8 @@
|
||||
<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="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>
|
||||
@@ -145,7 +150,7 @@
|
||||
<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' >
|
||||
<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>
|
||||
@@ -171,8 +176,9 @@
|
||||
<view class="sku-title">{{item.name}}</view>
|
||||
<view class="sku-list">
|
||||
<block v-for="it in item.values" :key='it.value_id'>
|
||||
<view :class="['sku-item',specselect[index] == it.value_id ? 'sku-active':'']" @click="clickSkus(index,it.value_id)">
|
||||
{{it.value}}
|
||||
<view :class="['sku-item',specselect[index] == it.value_id ? 'sku-active':'']"
|
||||
@click="clickSkus(index,it.value_id)">
|
||||
{{it.value}}
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
@@ -180,7 +186,8 @@
|
||||
|
||||
<view class="buy-number">
|
||||
<view class="buy-title">数量</view>
|
||||
<uni-number-box :min="1" :max="selectSkusValues.stock" :disabled="selectSkusValues.stock == 0" @change="qty = $event" />
|
||||
<uni-number-box :min="1" :max="selectSkusValues.stock" :disabled="selectSkusValues.stock == 0"
|
||||
@change="qty = $event" />
|
||||
</view>
|
||||
|
||||
<!-- 立即购买 shop_vip.status 区分是否是 vip 商品 只支持单规格php 规定不支持多规格 否则的就却分是拼团商品还是普通商品 -->
|
||||
@@ -189,10 +196,16 @@
|
||||
@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>
|
||||
</u-popup>
|
||||
|
||||
<!-- 分享 -->
|
||||
<uni-popup ref="popupShare" type="share" background-color="#fff">
|
||||
<uni-popup-share title="立即分享到" @select="select" />
|
||||
</uni-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -231,11 +244,16 @@
|
||||
// "is_receive": false // 当前会员是否已领取过 false 未领取 true 已领取
|
||||
},
|
||||
// collageid:'' ,// 拼团 id
|
||||
collageitem:'',// 已选择的拼团的 item
|
||||
collageitem: '', // 已选择的拼团的 item
|
||||
shareId: '', // 从分享页带过来的 id 区分是否能展示可拼团列表及底部按钮直接拼!
|
||||
};
|
||||
},
|
||||
onShow() {
|
||||
this.getGoods()
|
||||
if (this.$Route.query.shareId) {
|
||||
this.shareId = this.$Route.query.shareId;
|
||||
console.log(this.shareId)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getGoods() {
|
||||
@@ -263,31 +281,81 @@
|
||||
this.getMorePin = false
|
||||
this.pinShow = false
|
||||
this.qty = 1;
|
||||
// this.specselect = this.skus[0].unit.split('|')
|
||||
// this.selectSkusValues = this.skus[0]
|
||||
// this.specselect = this.skus[0].unit.split('|')
|
||||
// this.selectSkusValues = this.skus[0]
|
||||
},
|
||||
// 去拼单
|
||||
toPin(item) {
|
||||
console.log(item);
|
||||
this.close();
|
||||
if(item.can_share){
|
||||
this.share()
|
||||
}else{
|
||||
this.collageitem = item
|
||||
if (item.can_share) {
|
||||
this.share(item)
|
||||
} else {
|
||||
this.pinShow = true;
|
||||
this.collageitem = item
|
||||
}
|
||||
},
|
||||
// 分享
|
||||
share(){
|
||||
console.log(' 分享。。。')
|
||||
share() {
|
||||
this.$refs.popupShare.open();
|
||||
},
|
||||
// 分享
|
||||
onShare() {},
|
||||
|
||||
// 分享选项
|
||||
select(e) {
|
||||
console.log(this.collageitem)
|
||||
switch (e.item.name) {
|
||||
case 'wxchum':
|
||||
uni.share({
|
||||
provider: 'weixin',
|
||||
scene: 'WXSceneSession',
|
||||
type: 0,
|
||||
href: this.collageitem.url + this.collageitem.collage_id + 'invitation' + this
|
||||
.collageitem.invite,
|
||||
title: '【仅剩' + this.collageitem.surplus + '个名额】邀请您一起拼团',
|
||||
summary: '好货不用一分钱,点点就能带回家【 ' + this.goods.name + '】',
|
||||
imageUrl: this.goods.cover,
|
||||
fail: (err) => {
|
||||
uni.showToast({
|
||||
title: err.errMsg,
|
||||
icon: 'none'
|
||||
})
|
||||
},
|
||||
success: (res) => {
|
||||
this.collageitem = {}
|
||||
}
|
||||
})
|
||||
break;
|
||||
case 'wxcircle':
|
||||
uni.share({
|
||||
provider: 'weixin',
|
||||
scene: 'WXSceneTimeline',
|
||||
type: 0,
|
||||
href: this.collageitem.url + this.collageitem.collage_id + 'invitation' + this
|
||||
.collageitem.invite,
|
||||
summary: '好货不用一分钱,点点就能带回家【 ' + this.goods.name + '】',
|
||||
imageUrl: this.goods.cover,
|
||||
fail: (err) => {
|
||||
uni.showToast({
|
||||
title: err.errMsg,
|
||||
icon: 'none'
|
||||
})
|
||||
},
|
||||
success: (res) => {
|
||||
this.collageitem = {}
|
||||
}
|
||||
})
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
// 弹出 拼团不可点
|
||||
showPinToast(){
|
||||
uni.showToast({
|
||||
title:this.goods.active.message,
|
||||
icon:'none',
|
||||
mask:true,
|
||||
})
|
||||
showPinToast() {
|
||||
uni.showToast({
|
||||
title: this.goods.active.message,
|
||||
icon: 'none',
|
||||
mask: true,
|
||||
})
|
||||
},
|
||||
clickSkus(index, id) {
|
||||
this.skuid = ''
|
||||
@@ -331,23 +399,23 @@
|
||||
if (this.shop_vip.is_receive) {
|
||||
uni.showModal({
|
||||
title: '温馨提示',
|
||||
content: this.shop_vip.alert_text+'请联系线下商家:' + this.goods.shop.mobile,
|
||||
content: this.shop_vip.alert_text + '请联系线下商家:' + this.goods.shop.mobile,
|
||||
cancelText: '再看看',
|
||||
cancelColor: '#999',
|
||||
showCancel:false,
|
||||
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
|
||||
// }
|
||||
// if (res.confirm) {
|
||||
// //#ifdef MP-WEIXIN
|
||||
// uni.makePhoneCall({
|
||||
// phoneNumber: '18354789632'
|
||||
// });
|
||||
// //#endif
|
||||
// //#ifdef APP-PLUS
|
||||
// plus.device.dial('18354789632', true);
|
||||
// //#endif
|
||||
// }
|
||||
}
|
||||
})
|
||||
} else {
|
||||
@@ -366,7 +434,8 @@
|
||||
if (res.confirm) {
|
||||
this.close();
|
||||
uni.navigateTo({
|
||||
url: '/pages/store/vip/index/index?id=' + this.goods.shop.shop_id
|
||||
url: '/pages/store/vip/index/index?id=' + this.goods.shop
|
||||
.shop_id
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -407,14 +476,17 @@
|
||||
skuId: this.skuid,
|
||||
qty: this.qty
|
||||
}
|
||||
if(this.goods.is_active){
|
||||
params.type ='pin';
|
||||
params.collageid = this.collageitem.collage_id || '';
|
||||
if (this.goods.is_active) {
|
||||
params.type = 'pin';
|
||||
params.collageid = this.collageitem.collage_id || '';
|
||||
}
|
||||
if (this.shareId != '') {
|
||||
params.collageid = this.shareId || '';
|
||||
}
|
||||
console.log(params)
|
||||
this.$Router.push({
|
||||
name: 'StoreBuy',
|
||||
params:params
|
||||
params: params
|
||||
})
|
||||
this.close()
|
||||
},
|
||||
@@ -479,7 +551,8 @@
|
||||
font-size: $title-size-m;
|
||||
text-shadow: 0 5rpx 5rpx rgba($color: #000000, $alpha: .02);
|
||||
}
|
||||
.vipGoodsInfo{
|
||||
|
||||
.vipGoodsInfo {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
@@ -488,7 +561,7 @@
|
||||
color: #fff;
|
||||
font-size: 30rpx;
|
||||
padding: 4rpx 30rpx;
|
||||
border-radius: 0 0 40rpx 0;
|
||||
border-radius: 0 0 40rpx 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -501,14 +574,16 @@
|
||||
border-radius: $radius $radius 0 0;
|
||||
box-shadow: 0 0 10rpx 10rpx rgba($color: #000000, $alpha: .02);
|
||||
padding-bottom: ($padding*2) + 90;
|
||||
.vipType{
|
||||
|
||||
.vipType {
|
||||
color: #fff;
|
||||
font-size:28rpx;
|
||||
margin-right:10rpx;
|
||||
font-size: 28rpx;
|
||||
margin-right: 10rpx;
|
||||
padding: 2rpx 20rpx;
|
||||
background-color: #e5c175;
|
||||
border-radius: 20rpx 0 20rpx 0;
|
||||
}
|
||||
|
||||
.hr {
|
||||
position: relative;
|
||||
min-height: 1rpx;
|
||||
@@ -568,11 +643,12 @@
|
||||
font-size: 60%;
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
.del{
|
||||
|
||||
.del {
|
||||
text-decoration: line-through;
|
||||
margin-left: 20rpx;
|
||||
font-size: 26rpx;
|
||||
color:#999;
|
||||
color: #999;
|
||||
font-weight: normal;
|
||||
}
|
||||
}
|
||||
@@ -737,7 +813,8 @@
|
||||
padding: 6rpx 20rpx;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
.noneBtn{
|
||||
|
||||
.noneBtn {
|
||||
border: #999 1rpx solid;
|
||||
color: #999;
|
||||
padding: 6rpx 20rpx;
|
||||
@@ -914,7 +991,7 @@
|
||||
height: 90rpx;
|
||||
margin: 10rpx 20rpx;
|
||||
border-radius: 50%;
|
||||
border:solid 2rpx #f9f9f9;
|
||||
border: solid 2rpx #f9f9f9;
|
||||
}
|
||||
|
||||
.me {
|
||||
@@ -1013,7 +1090,8 @@
|
||||
padding: 6rpx 20rpx;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
.noneBtn{
|
||||
|
||||
.noneBtn {
|
||||
border: #999 1rpx solid;
|
||||
color: #999;
|
||||
padding: 6rpx 20rpx;
|
||||
@@ -1150,4 +1228,4 @@
|
||||
margin-top: $margin;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -25,8 +25,13 @@
|
||||
<view class="classify-item-title">{{item.name}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-scroll-list>
|
||||
|
||||
</u-scroll-list>
|
||||
|
||||
<!-- 拼团广告图 -->
|
||||
<view class="collage" v-if="collage_banner!=''">
|
||||
<image @click="goCollage" :src="collage_banner" mode="widthFix" />
|
||||
</view>
|
||||
|
||||
<!-- 每日上新 -->
|
||||
<view class="new-box">
|
||||
<view class="title">上新精选<text class="title-des"> | 精品上新新品推荐</text></view>
|
||||
@@ -40,11 +45,11 @@
|
||||
<view class="news-price nowrap">{{item.price.price_min}} <text>DT积分</text></view>
|
||||
</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
|
||||
<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">
|
||||
@@ -116,7 +121,8 @@
|
||||
goodsArr: [],
|
||||
meals: [],
|
||||
shops: [],
|
||||
vips:[]
|
||||
vips:[],
|
||||
collage_banner:''
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
@@ -131,12 +137,17 @@
|
||||
this.goodTabs = res.categories
|
||||
this.meals = res.meals
|
||||
this.shops = res.shops
|
||||
this.vips = res.vips
|
||||
this.vips = res.vips
|
||||
this.collage_banner = res.collage_banner
|
||||
uni.stopPullDownRefresh()
|
||||
})
|
||||
},
|
||||
goCollage(){
|
||||
uni.navigateTo({
|
||||
url:'/pages/group-book/index'
|
||||
})
|
||||
},
|
||||
goBook(item) {
|
||||
console.log(item)
|
||||
if (item.url) {
|
||||
if (item.url.openType === 'navigateTo') {
|
||||
if (item.url.params != '') {
|
||||
@@ -302,6 +313,14 @@
|
||||
&-item:nth-child(2) {
|
||||
background: #c9ead9;
|
||||
}
|
||||
}
|
||||
// 全民拼团
|
||||
.collage{
|
||||
box-sizing: border-box;
|
||||
image{
|
||||
width: 100%;
|
||||
height: 0;
|
||||
}
|
||||
}
|
||||
|
||||
// 上新精选
|
||||
|
||||
@@ -113,7 +113,11 @@
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
<view class="btns-box">
|
||||
<view class="btns-box">
|
||||
<view class="btns-box-item" @click="onBtn('PinList', {})">
|
||||
<image class="icon" src="@/static/user/userIcon_15.png" mode="widthFix" />
|
||||
我的拼单 <uni-icons class="forward" type="forward" color="#999" />
|
||||
</view>
|
||||
<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" />
|
||||
|
||||
BIN
static/store/fire.png
Normal file
BIN
static/store/fire.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.8 KiB |
BIN
static/store/store-vip-bg-bak.png
Normal file
BIN
static/store/store-vip-bg-bak.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 24 KiB |
BIN
static/user/userIcon_15.png
Normal file
BIN
static/user/userIcon_15.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.0 KiB |
0
uni_modules/oct-order-pin/changelog.md
Normal file
0
uni_modules/oct-order-pin/changelog.md
Normal file
297
uni_modules/oct-order-pin/components/oct-order-pin/index.vue
Normal file
297
uni_modules/oct-order-pin/components/oct-order-pin/index.vue
Normal file
@@ -0,0 +1,297 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="order--content" :class="[pattern ? 'chunk': 'broad']">
|
||||
<block v-if="!stores">
|
||||
<view class="order--group--header" @click="$emit('onBtn', {type: 'shopsDetail', order: orderInfo})">
|
||||
<image class="logo" v-if="orderInfo.shop.cover != ''" :src="orderInfo.shop.cover" mode="aspectFill"></image>
|
||||
<view class="store">
|
||||
{{orderInfo.shop.name}} <uni-icons type="right" size="16" color="#666" />
|
||||
</view>
|
||||
<view class="stateText" :style="{color: stateColor}">
|
||||
{{orderInfo.stateText}}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="order--header">
|
||||
<view class="order--no">
|
||||
订单号:{{orderInfo.no}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="order--flex" @click="$emit('onBtn', {type: 'goodsDetail', order: orderInfo})">
|
||||
<image class="order--cover" :src="orderInfo.cover" mode="aspectFill"></image>
|
||||
<view class="order--title">
|
||||
{{orderInfo.name}}
|
||||
<view class="unit"> {{orderInfo.unit}} </view>
|
||||
</view>
|
||||
<view class="order--count">
|
||||
<view class="order--price">{{orderInfo.price}}<text>DT积分</text></view>
|
||||
<view class="order--sum">共{{orderInfo.sum}} 件</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<block v-else>
|
||||
<view class="order--group">
|
||||
<view class="order--group--header">
|
||||
<image class="logo" v-if="orderInfo.store.logo != ''" :src="orderInfo.store.logo" mode="aspectFill"></image>
|
||||
<view class="store">
|
||||
{{orderInfo.store.name}}
|
||||
</view>
|
||||
<view class="stateText" :style="{color: stateColor}">
|
||||
{{orderInfo.stateText}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="order--group--flex" v-for="(storeItem, storeGood) in orderInfo.storesGoods" :key="storeGood">
|
||||
<image class="order--cover" :src="storeItem.cover" mode="aspectFill"></image>
|
||||
<view class="order--title">{{storeItem.name}}</view>
|
||||
<view class="order--count">
|
||||
<view class="order--price">{{storeItem.price}}<text>DT积分</text></view>
|
||||
<view class="order--sum"> X {{storeItem.sum}} </view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<slot name="btns" v-if="orderInfo.cans">
|
||||
<view class="order--btns">
|
||||
<view v-show="orderInfo.cans.cancel" class="item item--cancel" @click="$emit('onBtn', {type: 'cancel', order: orderInfo})">取消订单</view>
|
||||
<view v-show="orderInfo.cans.refund_money" class="item item--cancel" @click="$emit('onBtn', {type: 'refundMoney', order: orderInfo})">申请退款</view>
|
||||
<view v-show="orderInfo.cans.refund" class="item item--cancel" @click="$emit('onBtn', {type: 'refund', order: orderInfo})">申请售后</view>
|
||||
<view v-show="orderInfo.cans.delete" class="item item--delete" @click="$emit('onBtn', {type: 'delete', order: orderInfo})">删除订单</view>
|
||||
<view v-show="orderInfo.cans.logistic_show" class="item item--logistic" @click="$emit('onBtn', {type: 'logistic', order: orderInfo})">查看物流</view>
|
||||
<view v-show="orderInfo.cans.pay" class="item item--pay" @click="$emit('onBtn', {type: 'pay', order: orderInfo})">立即支付</view>
|
||||
<view v-show="orderInfo.cans.sign" class="item item--sign" @click="$emit('onBtn', {type: 'sign', order: orderInfo})">确认签收</view>
|
||||
</view>
|
||||
</slot>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
export default{
|
||||
props:{
|
||||
// 订单样式否为块
|
||||
pattern: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
// 店铺模式
|
||||
stores: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
// 订单信息
|
||||
orderInfo: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {
|
||||
cover : "",
|
||||
name : "",
|
||||
price : "",
|
||||
sum : 1,
|
||||
stateText : ""
|
||||
}
|
||||
}
|
||||
},
|
||||
// 状态标签颜色
|
||||
stateColor: {
|
||||
type : String,
|
||||
default : "#FF6160"
|
||||
},
|
||||
// 可操作按钮组
|
||||
orderBtns: {
|
||||
type : Array,
|
||||
default : () => {
|
||||
return [
|
||||
{
|
||||
text: "订单详情",
|
||||
type: "info"
|
||||
},{
|
||||
text : "删除订单",
|
||||
type : "delete",
|
||||
style: { color: "#FF6160" }
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
$margin: 30rpx;
|
||||
$radius: 10rpx;
|
||||
.text-nowrap {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.text-ellipsis{
|
||||
display: -webkit-box;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
}
|
||||
.order--content{
|
||||
background: white;
|
||||
&.chunk{
|
||||
margin: $margin $margin;
|
||||
border-radius: $radius;
|
||||
padding: $margin;
|
||||
}
|
||||
&.broad{
|
||||
padding: $margin;
|
||||
border-bottom: solid 1rpx #ddd;
|
||||
}
|
||||
.order--header{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding-bottom: $margin;
|
||||
border-top: solid 1rpx #f9f9f9;
|
||||
align-items: center;
|
||||
& > .order--no{
|
||||
flex: 1;
|
||||
margin-right: $margin;
|
||||
font-size: 26rpx;
|
||||
line-height: 40rpx;
|
||||
color: #555;
|
||||
@extend .text-nowrap;
|
||||
padding-top: 10rpx;
|
||||
}
|
||||
&> .stateText{
|
||||
font-size: 26rpx;
|
||||
color: $text-price;
|
||||
}
|
||||
}
|
||||
.order--flex{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.order--cover{
|
||||
vertical-align: top;
|
||||
width: 128rpx;
|
||||
height: 128rpx;
|
||||
}
|
||||
.order--title{
|
||||
@extend .text-ellipsis;
|
||||
text-align: left;
|
||||
flex: 1;
|
||||
padding-left: $margin;
|
||||
font-size: 28rpx;
|
||||
line-height: 40rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
justify-content: center;
|
||||
box-sizing: border-box;
|
||||
.unit{
|
||||
color: #999;
|
||||
font-size: 26rpx;
|
||||
padding-top: 10rpx;
|
||||
}
|
||||
}
|
||||
.order--count{
|
||||
text-align: right;
|
||||
padding-left: $margin;
|
||||
line-height: 40rpx;
|
||||
// color: $text-price;
|
||||
.order--price{
|
||||
font-size: 30rpx;
|
||||
font-weight: bold;
|
||||
&>text{
|
||||
font-size: 24rpx;
|
||||
font-weight: normal;
|
||||
padding-left: 10rpx;
|
||||
}
|
||||
}
|
||||
.order--sum{
|
||||
font-size: 26rpx;
|
||||
color: #777;
|
||||
}
|
||||
}
|
||||
}
|
||||
.order--group{
|
||||
.order--group--header{
|
||||
padding-bottom: $margin;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
&> .logo{
|
||||
width: 38rpx;
|
||||
height: 38rpx;
|
||||
vertical-align: middle;
|
||||
margin-right: $margin/2;
|
||||
}
|
||||
&> .store{
|
||||
@extend .text-nowrap;
|
||||
flex: 1;
|
||||
margin-right: $margin;
|
||||
font-size: 28rpx;
|
||||
line-height: 40rpx;
|
||||
color: #555;
|
||||
}
|
||||
&> .stateText{
|
||||
font-size: 26rpx;
|
||||
}
|
||||
}
|
||||
.order--group--flex{
|
||||
@extend .order--flex;
|
||||
margin-bottom: $margin - 10;
|
||||
&:last-child{
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.order--group--header{
|
||||
padding-bottom: $margin;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
&> .logo{
|
||||
width: 38rpx;
|
||||
height: 38rpx;
|
||||
vertical-align: middle;
|
||||
margin-right: $margin/2;
|
||||
}
|
||||
&> .store{
|
||||
@extend .text-nowrap;
|
||||
flex: 1;
|
||||
margin-right: $margin;
|
||||
font-size: 28rpx;
|
||||
line-height: 40rpx;
|
||||
color: #555;
|
||||
}
|
||||
&> .stateText{
|
||||
font-size: 26rpx;
|
||||
}
|
||||
}
|
||||
.order--group--flex{
|
||||
@extend .order--flex;
|
||||
margin-bottom: $margin - 10;
|
||||
&:last-child{
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
.order--btns{
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
padding-top: $margin - 10;
|
||||
&> .item{
|
||||
font-size: 26rpx;
|
||||
margin-left: $margin/2;
|
||||
color: #333;
|
||||
line-height: 56rpx;
|
||||
border: solid 1rpx #ddd;
|
||||
padding: 0 ($margin - 10);
|
||||
border-radius: 28rpx;
|
||||
&--cancel,
|
||||
&--delete,
|
||||
&--logistic{
|
||||
color: #666;
|
||||
}
|
||||
&--pay,
|
||||
&--sign{
|
||||
color: #34CE98;
|
||||
border-color: #34CE98;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
80
uni_modules/oct-order-pin/package.json
Normal file
80
uni_modules/oct-order-pin/package.json
Normal file
@@ -0,0 +1,80 @@
|
||||
{
|
||||
"id": "oct-order",
|
||||
"displayName": "oct-order",
|
||||
"version": "1.0.0",
|
||||
"description": "oct-order",
|
||||
"keywords": [
|
||||
"oct-order"
|
||||
],
|
||||
"repository": "",
|
||||
"engines": {
|
||||
"HBuilderX": "^3.1.0"
|
||||
},
|
||||
"dcloudext": {
|
||||
"category": [
|
||||
"前端组件",
|
||||
"通用组件"
|
||||
],
|
||||
"sale": {
|
||||
"regular": {
|
||||
"price": "0.00"
|
||||
},
|
||||
"sourcecode": {
|
||||
"price": "0.00"
|
||||
}
|
||||
},
|
||||
"contact": {
|
||||
"qq": ""
|
||||
},
|
||||
"declaration": {
|
||||
"ads": "",
|
||||
"data": "",
|
||||
"permissions": ""
|
||||
},
|
||||
"npmurl": ""
|
||||
},
|
||||
"uni_modules": {
|
||||
"dependencies": [],
|
||||
"encrypt": [],
|
||||
"platforms": {
|
||||
"cloud": {
|
||||
"tcb": "u",
|
||||
"aliyun": "u"
|
||||
},
|
||||
"client": {
|
||||
"Vue": {
|
||||
"vue2": "u",
|
||||
"vue3": "u"
|
||||
},
|
||||
"App": {
|
||||
"app-vue": "u",
|
||||
"app-nvue": "u"
|
||||
},
|
||||
"H5-mobile": {
|
||||
"Safari": "u",
|
||||
"Android Browser": "u",
|
||||
"微信浏览器(Android)": "u",
|
||||
"QQ浏览器(Android)": "u"
|
||||
},
|
||||
"H5-pc": {
|
||||
"Chrome": "u",
|
||||
"IE": "u",
|
||||
"Edge": "u",
|
||||
"Firefox": "u",
|
||||
"Safari": "u"
|
||||
},
|
||||
"小程序": {
|
||||
"微信": "u",
|
||||
"阿里": "u",
|
||||
"百度": "u",
|
||||
"字节跳动": "u",
|
||||
"QQ": "u"
|
||||
},
|
||||
"快应用": {
|
||||
"华为": "u",
|
||||
"联盟": "u"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
1
uni_modules/oct-order-pin/readme.md
Normal file
1
uni_modules/oct-order-pin/readme.md
Normal file
@@ -0,0 +1 @@
|
||||
# 订单列表
|
||||
Binary file not shown.
18
unpackage/dist/build/app-plus/app-service.js
vendored
18
unpackage/dist/build/app-plus/app-service.js
vendored
File diff suppressed because one or more lines are too long
6
unpackage/dist/build/app-plus/app-view.js
vendored
6
unpackage/dist/build/app-plus/app-view.js
vendored
File diff suppressed because one or more lines are too long
6
unpackage/dist/build/app-plus/manifest.json
vendored
6
unpackage/dist/build/app-plus/manifest.json
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
7566
unpackage/dist/dev/app-plus/app-service.js
vendored
7566
unpackage/dist/dev/app-plus/app-service.js
vendored
File diff suppressed because one or more lines are too long
4974
unpackage/dist/dev/app-plus/app-view.js
vendored
4974
unpackage/dist/dev/app-plus/app-view.js
vendored
File diff suppressed because one or more lines are too long
2
unpackage/dist/dev/app-plus/manifest.json
vendored
2
unpackage/dist/dev/app-plus/manifest.json
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user