Merge branch 'dev' into 'master'
Dev See merge request uniapp/yshop-uniapp!1
This commit is contained in:
+1
-1
@@ -69,7 +69,7 @@ export function getHostProducts(page, limit) {
|
|||||||
* */
|
* */
|
||||||
export function getGroomList(type) {
|
export function getGroomList(type) {
|
||||||
return request.get("/groom/list/" + type, {}, {
|
return request.get("/groom/list/" + type, {}, {
|
||||||
login: false
|
login: true
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+24
-4
@@ -1,3 +1,6 @@
|
|||||||
|
page {
|
||||||
|
background: #f5f5f5;
|
||||||
|
}
|
||||||
.newsList .newsSwitch .van-hairline--top-bottom::after {
|
.newsList .newsSwitch .van-hairline--top-bottom::after {
|
||||||
border: 0;
|
border: 0;
|
||||||
}
|
}
|
||||||
@@ -1739,18 +1742,21 @@ flex: 0 2.4*100rpx;
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
height: 0.86*100rpx;
|
height: 0.86*100rpx;
|
||||||
padding-left: 0.23*100rpx;
|
padding-left: 0.23*100rpx;
|
||||||
|
padding-right: 0.23*100rpx;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
left: 0;
|
left: 0;
|
||||||
top: 0;
|
top: 0;
|
||||||
z-index: 5;
|
z-index: 5;
|
||||||
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
.productList .search .input {
|
.productList .search .input {
|
||||||
width: 6.4*100rpx;
|
flex:1;
|
||||||
height: 0.6*100rpx;
|
height: 0.6*100rpx;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
border-radius: 0.5*100rpx;
|
border-radius: 0.5*100rpx;
|
||||||
padding: 0 0.2*100rpx;
|
padding: 0 0.2*100rpx;
|
||||||
|
margin-right: 0.23*100rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.productList .search .input input {
|
.productList .search .input input {
|
||||||
@@ -2548,7 +2554,7 @@ flex: 0 2.4*100rpx;
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.product-con .product-intro .conter image{
|
.product-con .product-intro .conter *{
|
||||||
width: 100% !important;
|
width: 100% !important;
|
||||||
display: block !important;
|
display: block !important;
|
||||||
}
|
}
|
||||||
@@ -4494,7 +4500,7 @@ flex: 0 2.4*100rpx;
|
|||||||
transform: rotate(180deg);
|
transform: rotate(180deg);
|
||||||
}
|
}
|
||||||
|
|
||||||
.bargain .bargainGang .title .pictrue img,
|
.bargain .bargainGang .title .pictrue image,
|
||||||
.bargain .goodsDetails .title .pictrue image{
|
.bargain .goodsDetails .title .pictrue image{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
@@ -6984,7 +6990,7 @@ flex: 0 2.4*100rpx;
|
|||||||
}
|
}
|
||||||
|
|
||||||
.product-con .footerRush .bnt {
|
.product-con .footerRush .bnt {
|
||||||
width: 86%;
|
width: 100%;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
line-height: 1*100rpx;
|
line-height: 1*100rpx;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
@@ -8425,3 +8431,17 @@ flex: 0 2.4*100rpx;
|
|||||||
}
|
}
|
||||||
|
|
||||||
.swiper-wrapper {}
|
.swiper-wrapper {}
|
||||||
|
|
||||||
|
.posterCanvasWarp{
|
||||||
|
position: relative;
|
||||||
|
width:0;
|
||||||
|
height:0;
|
||||||
|
overflow: hidden;
|
||||||
|
.posterCanvas{
|
||||||
|
position: absolute;
|
||||||
|
left:0;
|
||||||
|
top:0;
|
||||||
|
width:747px !important;
|
||||||
|
height:1326px !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
+32
-37
@@ -1,62 +1,57 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="time">
|
<view class="time">
|
||||||
{{ tipText }}
|
<text v-if="rtipText">{{ rtipText }}</text>
|
||||||
<text class="styleAll" v-if="isDay === true">{{ day }}</text>
|
<text class="styleAll" v-if="risDay === true">{{ rday }}</text>
|
||||||
<!-- <text class="timeTxt">{{ dayText }}</text> -->
|
<text class="timeTxt" v-if="rdayText">{{ rdayText }}</text>
|
||||||
<text class="styleAll">{{ hour }}</text>
|
<text class="styleAll">{{ hour }}</text>
|
||||||
<text class="timeTxt">{{ hourText }}</text>
|
<text class="timeTxt" v-if="rhourText">{{ rhourText }}</text>
|
||||||
<text class="styleAll">{{ minute }}</text>
|
<text class="styleAll">{{ minute }}</text>
|
||||||
<text class="timeTxt">{{ minuteText }}</text>
|
<text class="timeTxt" v-if="rminuteText">{{ rminuteText }}</text>
|
||||||
<text class="styleAll">{{ second }}</text>
|
<text class="styleAll">{{ second }}</text>
|
||||||
<!-- <text class="timeTxt">{{ secondText }}</text> -->
|
<text class="timeTxt" v-if="rsecondText">{{ rsecondText }}</text>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: "CountDown",
|
name: "CountDown",
|
||||||
props: {
|
props: [
|
||||||
//距离开始提示文字
|
//距离开始提示文字
|
||||||
tipText: {
|
'tipText',
|
||||||
type: String,
|
'dayText',
|
||||||
default: "倒计时"
|
'hourText',
|
||||||
},
|
'minuteText',
|
||||||
dayText: {
|
'secondText',
|
||||||
type: String,
|
'datatime',
|
||||||
default: "天"
|
'isDay'
|
||||||
},
|
],
|
||||||
hourText: {
|
|
||||||
type: String,
|
|
||||||
default: "时"
|
|
||||||
},
|
|
||||||
minuteText: {
|
|
||||||
type: String,
|
|
||||||
default: "分"
|
|
||||||
},
|
|
||||||
secondText: {
|
|
||||||
type: String,
|
|
||||||
default: "秒"
|
|
||||||
},
|
|
||||||
datatime: {
|
|
||||||
type: Number,
|
|
||||||
default: 0
|
|
||||||
},
|
|
||||||
isDay: {
|
|
||||||
type: Boolean,
|
|
||||||
default: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
data: function() {
|
data: function() {
|
||||||
return {
|
return {
|
||||||
day: "00",
|
day: "00",
|
||||||
hour: "00",
|
hour: "00",
|
||||||
minute: "00",
|
minute: "00",
|
||||||
second: "00"
|
second: "00",
|
||||||
|
rtipText: "倒计时",
|
||||||
|
rdayText: "天",
|
||||||
|
rhourText: "时",
|
||||||
|
rminuteText: "分",
|
||||||
|
rsecondText: "秒",
|
||||||
|
rdatatime: 0,
|
||||||
|
risDay: true
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created: function() {
|
created: function() {
|
||||||
// this.show_time();
|
// this.show_time();
|
||||||
},
|
},
|
||||||
mounted: function() {
|
mounted: function() {
|
||||||
|
console.log(this)
|
||||||
|
this.rtipText = this.$props.tipText;
|
||||||
|
this.rdayText = this.$props.dayText;
|
||||||
|
this.rhourText = this.$props.hourText;
|
||||||
|
this.rminuteText = this.$props.minuteText;
|
||||||
|
this.rsecondText = this.$props.secondText;
|
||||||
|
this.rdatatime = this.$props.datatime;
|
||||||
|
this.risDay = this.$props.isDay;
|
||||||
|
console.log(this.rdayText)
|
||||||
this.show_time();
|
this.show_time();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|||||||
@@ -16,11 +16,7 @@
|
|||||||
v-if="cart.productInfo.attrInfo"
|
v-if="cart.productInfo.attrInfo"
|
||||||
>{{ cart.productInfo.attrInfo.suk }}</view>
|
>{{ cart.productInfo.attrInfo.suk }}</view>
|
||||||
<view class="money font-color-red">¥{{ cart.truePrice }}</view>
|
<view class="money font-color-red">¥{{ cart.truePrice }}</view>
|
||||||
<view
|
<view class="evaluate" v-if="evaluate == 3" @click="routerGo(cart)">评价</view>
|
||||||
class="evaluate"
|
|
||||||
v-if="evaluate == 3"
|
|
||||||
@click="routerGo(cart)"
|
|
||||||
>评价</view>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -41,9 +37,12 @@ export default {
|
|||||||
},
|
},
|
||||||
mounted: function() {},
|
mounted: function() {},
|
||||||
methods: {
|
methods: {
|
||||||
routerGo(item) {
|
routerGo(cart) {
|
||||||
this.$yrouter.push({ path: '/pages/shop/GoodsEvaluate/index',query:{id:cart.unique} });
|
this.$yrouter.push({
|
||||||
},
|
path: "/pages/shop/GoodsEvaluate/index",
|
||||||
|
query: { id: cart.unique }
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -65,13 +65,8 @@ export default {
|
|||||||
data: function() {
|
data: function() {
|
||||||
return {};
|
return {};
|
||||||
},
|
},
|
||||||
watch: {
|
|
||||||
attr:function(ne){
|
|
||||||
console.log(ne)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted: function() {
|
mounted: function() {
|
||||||
console.log(this.attr)
|
console.log(this.attr);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
closeAttr: function() {
|
closeAttr: function() {
|
||||||
@@ -84,16 +79,23 @@ export default {
|
|||||||
this.$emit("changeFun", { action: "ChangeCartNum", value: 1 });
|
this.$emit("changeFun", { action: "ChangeCartNum", value: 1 });
|
||||||
},
|
},
|
||||||
tapAttr: function(indexw, indexn) {
|
tapAttr: function(indexw, indexn) {
|
||||||
|
// 修改商品规格不生效的原因:
|
||||||
|
// H5端下面写法,attr更新,但是除H5外其他端不支持,
|
||||||
|
// 尽量避免下面的骚写法,不要在子组件内更新props
|
||||||
|
// this.attr.productAttr[res.indexw].index = res.indexn;
|
||||||
let that = this;
|
let that = this;
|
||||||
console.log(that.attr.productAttr);
|
|
||||||
console.log(that.attr.productAttr[indexw], indexw, indexn);
|
|
||||||
that.attr.productAttr[indexw].index = indexn;
|
|
||||||
let value = that
|
let value = that
|
||||||
.getCheckedValue()
|
.getCheckedValue()
|
||||||
.sort()
|
.sort()
|
||||||
.join(",");
|
.join(",");
|
||||||
console.log(value);
|
that.$emit("changeFun", {
|
||||||
that.$emit("changeFun", { action: "ChangeAttr", value: value });
|
action: "ChangeAttr",
|
||||||
|
value: {
|
||||||
|
value,
|
||||||
|
indexw,
|
||||||
|
indexn
|
||||||
|
}
|
||||||
|
});
|
||||||
},
|
},
|
||||||
//获取被选中属性;
|
//获取被选中属性;
|
||||||
getCheckedValue: function() {
|
getCheckedValue: function() {
|
||||||
|
|||||||
+33
-25
@@ -1,6 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<view v-if="posterImageStatus" class="poster-first">
|
<view v-if="posterImageStatus" class="poster-first">
|
||||||
<canvas style="width:747px;height:1326px" canvas-id="myCanvas"></canvas>
|
<div class="posterCanvasWarp">
|
||||||
|
<canvas class="posterCanvas" canvas-id="myCanvas"></canvas>
|
||||||
|
</div>
|
||||||
<!-- <view class="poster-pop" v-show="!canvasStatus">
|
<!-- <view class="poster-pop" v-show="!canvasStatus">
|
||||||
<image
|
<image
|
||||||
src="@/static/images/poster-close.png"
|
src="@/static/images/poster-close.png"
|
||||||
@@ -25,7 +27,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="save-poster" @click="savePosterPath">生成图片</view>
|
<view class="save-poster" @click="savePosterPath">生成图片</view>
|
||||||
</view> -->
|
</view>-->
|
||||||
<view class="poster-pop" v-show="canvasStatus">
|
<view class="poster-pop" v-show="canvasStatus">
|
||||||
<img
|
<img
|
||||||
src="@/static/images/poster-close.png"
|
src="@/static/images/poster-close.png"
|
||||||
@@ -33,7 +35,13 @@
|
|||||||
@click="posterImageClose"
|
@click="posterImageClose"
|
||||||
mode="widthFix"
|
mode="widthFix"
|
||||||
/>
|
/>
|
||||||
<image :src="posterImage" alt="tp" class="poster-image" show-menu-by-longpress mode="widthFix" />
|
<image
|
||||||
|
:src="posterImage"
|
||||||
|
alt="tp"
|
||||||
|
class="poster-image"
|
||||||
|
show-menu-by-longpress
|
||||||
|
mode="widthFix"
|
||||||
|
/>
|
||||||
<view class="keep">长按图片可以保存到手机</view>
|
<view class="keep">长按图片可以保存到手机</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="mask"></view>
|
<view class="mask"></view>
|
||||||
@@ -44,78 +52,78 @@
|
|||||||
overscroll-behavior: contain;
|
overscroll-behavior: contain;
|
||||||
}
|
}
|
||||||
.poster-pop {
|
.poster-pop {
|
||||||
width: 4.5*100rpx;
|
width: 4.5 * 100rpx;
|
||||||
height: 8*100rpx;
|
height: 8 * 100rpx;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
transform: translateX(-50%);
|
transform: translateX(-50%);
|
||||||
z-index: 99;
|
z-index: 99;
|
||||||
top: 50%;
|
top: 50%;
|
||||||
margin-top: -4.6*100rpx;
|
margin-top: -4.6 * 100rpx;
|
||||||
}
|
}
|
||||||
.poster-pop .canvas {
|
.poster-pop .canvas {
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
height: 8*100rpx;
|
height: 8 * 100rpx;
|
||||||
}
|
}
|
||||||
.poster-pop .poster-image {
|
.poster-pop .poster-image {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: auto;
|
height: auto;
|
||||||
}
|
}
|
||||||
.poster-pop .canvas .image {
|
.poster-pop .canvas .image {
|
||||||
width: 4.5*100rpx;
|
width: 4.5 * 100rpx;
|
||||||
height: 4.5*100rpx;
|
height: 4.5 * 100rpx;
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
.poster-pop .canvas .text {
|
.poster-pop .canvas .text {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: #000000;
|
color: #000000;
|
||||||
margin-top: 0.32*100rpx;
|
margin-top: 0.32 * 100rpx;
|
||||||
}
|
}
|
||||||
.poster-pop .canvas .text.black {
|
.poster-pop .canvas .text.black {
|
||||||
height: 0.68*100rpx;
|
height: 0.68 * 100rpx;
|
||||||
}
|
}
|
||||||
.poster-pop .canvas .text.rad {
|
.poster-pop .canvas .text.rad {
|
||||||
color: #ff0000;
|
color: #ff0000;
|
||||||
}
|
}
|
||||||
.poster-pop .canvas .code {
|
.poster-pop .canvas .code {
|
||||||
height: 1.4*100rpx;
|
height: 1.4 * 100rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
.poster-pop .canvas .code .code-img {
|
.poster-pop .canvas .code .code-img {
|
||||||
width: 33%;
|
width: 33%;
|
||||||
padding: 0.06*100rpx;
|
padding: 0.06 * 100rpx;
|
||||||
}
|
}
|
||||||
.poster-pop .canvas .code .code-img image{
|
.poster-pop .canvas .code .code-img image {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
.poster-pop .canvas .code .code-text {
|
.poster-pop .canvas .code .code-text {
|
||||||
width: 60%;
|
width: 60%;
|
||||||
font-size: 0.12*100rpx;
|
font-size: 0.12 * 100rpx;
|
||||||
line-height: 1.64*100rpx;
|
line-height: 1.64 * 100rpx;
|
||||||
}
|
}
|
||||||
.poster-pop .close {
|
.poster-pop .close {
|
||||||
width: 0.46*100rpx;
|
width: 0.46 * 100rpx;
|
||||||
height: 0.75*100rpx;
|
height: 0.75 * 100rpx;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
right: 0;
|
right: 0;
|
||||||
top: -0.73*100rpx;
|
top: -0.73 * 100rpx;
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
.poster-pop .save-poster {
|
.poster-pop .save-poster {
|
||||||
background-color: #df2d0a;
|
background-color: #df2d0a;
|
||||||
font-size: 0.22*100rpx;
|
font-size: 0.22 * 100rpx;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
height: 0.76*100rpx;
|
height: 0.76 * 100rpx;
|
||||||
line-height: 0.76*100rpx;
|
line-height: 0.76 * 100rpx;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-top: -0.04*100rpx;
|
margin-top: -0.04 * 100rpx;
|
||||||
}
|
}
|
||||||
.poster-pop .keep {
|
.poster-pop .keep {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 0.25*100rpx;
|
font-size: 0.25 * 100rpx;
|
||||||
margin-top: 0.1*100rpx;
|
margin-top: 0.1 * 100rpx;
|
||||||
}
|
}
|
||||||
.mask {
|
.mask {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
|
|||||||
@@ -31,12 +31,12 @@ Vue.prototype.$validator = function(rule) {
|
|||||||
return new schema(rule);
|
return new schema(rule);
|
||||||
};
|
};
|
||||||
|
|
||||||
const CACHE_KEY = "clear_0.0.1";
|
// const CACHE_KEY = "clear_0.0.1";
|
||||||
|
|
||||||
if (!cookie.has(CACHE_KEY)) {
|
// if (!cookie.has(CACHE_KEY)) {
|
||||||
cookie.clearAll();
|
// cookie.clearAll();
|
||||||
cookie.set(CACHE_KEY, 1);
|
// cookie.set(CACHE_KEY, 1);
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
|
||||||
Vue.config.productionTip = false
|
Vue.config.productionTip = false
|
||||||
|
|||||||
@@ -8,12 +8,12 @@
|
|||||||
<view class="text acea-row row-column-around">
|
<view class="text acea-row row-column-around">
|
||||||
<view class="line1">{{ item.title }}</view>
|
<view class="line1">{{ item.title }}</view>
|
||||||
<count-down
|
<count-down
|
||||||
:is-day="true"
|
:isDay="true"
|
||||||
:tip-text="'倒计时 '"
|
:tipText="'倒计时 '"
|
||||||
:day-text="' 天 '"
|
:dayText="' 天 '"
|
||||||
:hour-text="' 时 '"
|
:hourText="' 时 '"
|
||||||
:minute-text="' 分 '"
|
:minuteText="' 分 '"
|
||||||
:second-text="' 秒'"
|
:secondText="' 秒'"
|
||||||
:datatime="item.datatime"
|
:datatime="item.datatime"
|
||||||
></count-down>
|
></count-down>
|
||||||
<view class="money font-color-red">
|
<view class="money font-color-red">
|
||||||
|
|||||||
@@ -14,12 +14,12 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<count-down
|
<count-down
|
||||||
:is-day="true"
|
:isDay="true"
|
||||||
:tip-text="'倒计时 '"
|
:tipText="'倒计时 '"
|
||||||
:day-text="' 天 '"
|
:dayText="' 天 '"
|
||||||
:hour-text="' 时 '"
|
:hourText="' 时 '"
|
||||||
:minute-text="' 分 '"
|
:minuteText="' 分 '"
|
||||||
:second-text="' 秒'"
|
:secondText="' 秒'"
|
||||||
:datatime="datatime"
|
:datatime="datatime"
|
||||||
></count-down>
|
></count-down>
|
||||||
</view>
|
</view>
|
||||||
@@ -84,9 +84,9 @@
|
|||||||
<image src="@/static/images/left.png" />
|
<image src="@/static/images/left.png" />
|
||||||
</view>
|
</view>
|
||||||
<view class="titleCon">砍价帮</view>
|
<view class="titleCon">砍价帮</view>
|
||||||
<view class="pictrue on">
|
<!-- <view class="pictrue on">
|
||||||
<image src="@/static/images/left.png" />
|
<image src="@/static/images/left.png" />
|
||||||
</view>
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
<view class="list">
|
<view class="list">
|
||||||
<view
|
<view
|
||||||
@@ -142,10 +142,10 @@
|
|||||||
<view class="conter" v-html="bargain.rule"></view>
|
<view class="conter" v-html="bargain.rule"></view>
|
||||||
</view>
|
</view>
|
||||||
<view class="bargainTip" :class="active === true ? 'on' : ''">
|
<view class="bargainTip" :class="active === true ? 'on' : ''">
|
||||||
<view class="pictrue">
|
<!-- <view class="pictrue">
|
||||||
<image src="@/static/images/bargainBg.jpg" />
|
<image src="@/static/images/bargainBg.jpg" />
|
||||||
<view class="iconfont icon-guanbi" @click="close"></view>
|
<view class="iconfont icon-guanbi" @click="close"></view>
|
||||||
</view>
|
</view> -->
|
||||||
<view class="cutOff" v-if="bargainPartake === userInfo.uid">
|
<view class="cutOff" v-if="bargainPartake === userInfo.uid">
|
||||||
您已砍掉
|
您已砍掉
|
||||||
<text class="font-color-red" v-text="bargainHelpPrice"></text>元,听说分享次数越多砍价成功的机会越大哦!
|
<text class="font-color-red" v-text="bargainHelpPrice"></text>元,听说分享次数越多砍价成功的机会越大哦!
|
||||||
@@ -507,6 +507,9 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less">
|
<style lang="less">
|
||||||
|
.bargain{
|
||||||
|
background: #00c17b;
|
||||||
|
}
|
||||||
.bargainBnts {
|
.bargainBnts {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
@@ -78,4 +78,7 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style >
|
<style >
|
||||||
|
page{
|
||||||
|
background: #00c17b;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -5,24 +5,36 @@
|
|||||||
</view>
|
</view>
|
||||||
<scroll-view scroll-y="false" scroll-x="true">
|
<scroll-view scroll-y="false" scroll-x="true">
|
||||||
<view class="timeScroll">
|
<view class="timeScroll">
|
||||||
<view class="" v-for="(item, index) in timeList" :key="index">
|
<view class v-for="(item, index) in timeList" :key="index">
|
||||||
<view :class="{'timeItem':true,'active':active==index}" @click="changeTime(index)">
|
<view :class="{'timeItem':true,'active':active==index}" @click="setTime(index)">
|
||||||
<view class="time">{{ item.time }}</view>
|
<view class="time">{{ item.time }}</view>
|
||||||
<view class="state">{{ item.state }}</view>
|
<view class="state">{{ item.state }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
<view class="" v-for="(item, index) in timeList" :key="index">
|
<view class v-for="(item, index) in timeList" :key="index">
|
||||||
<view v-if="active == index">
|
<view v-if="active == index">
|
||||||
<view class="countDown font-color-red acea-row row-center-wrapper">
|
<view class="countDown font-color-red acea-row row-center-wrapper">
|
||||||
<view v-if="item.status === 0" class="activity">活动已结束</view>
|
<view v-if="item.status === 0" class="activity">活动已结束</view>
|
||||||
<count-down :is-day="false" :tip-text="'距结束仅剩 '" :day-text="''" :hour-text="' : '" :minute-text="' : '"
|
<count-down
|
||||||
:second-text="''" :datatime="datatime" v-if="item.status === 1"></count-down>
|
:isDay="false"
|
||||||
|
:tipText="'距结束仅剩 '"
|
||||||
|
:dayText="false"
|
||||||
|
:hourText="' : '"
|
||||||
|
:minuteText="' : '"
|
||||||
|
:secondText="false"
|
||||||
|
:datatime="datatime"
|
||||||
|
v-if="item.status === 1"
|
||||||
|
></count-down>
|
||||||
<view v-if="item.status === 2" class="activity">活动即将开始</view>
|
<view v-if="item.status === 2" class="activity">活动即将开始</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="list">
|
<view class="list">
|
||||||
<view class="item acea-row row-between-wrapper" v-for="(itemSeckill, indexSeckill) in seckillList" :key="indexSeckill">
|
<view
|
||||||
|
class="item acea-row row-between-wrapper"
|
||||||
|
v-for="(itemSeckill, indexSeckill) in seckillList"
|
||||||
|
:key="indexSeckill"
|
||||||
|
>
|
||||||
<view class="pictrue">
|
<view class="pictrue">
|
||||||
<image :src="itemSeckill.image" />
|
<image :src="itemSeckill.image" />
|
||||||
</view>
|
</view>
|
||||||
@@ -37,13 +49,21 @@
|
|||||||
<view class="piece font-color-red" v-text="'仅剩' + itemSeckill.stock + '件'"></view>
|
<view class="piece font-color-red" v-text="'仅剩' + itemSeckill.stock + '件'"></view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="grab bg-color-red" v-if="item.status === 1 && itemSeckill.stock > 0" @click="goDetail(itemSeckill.id)">马上抢</view>
|
<view
|
||||||
|
class="grab bg-color-red"
|
||||||
|
v-if="item.status === 1 && itemSeckill.stock > 0"
|
||||||
|
@click="goDetail(itemSeckill.id)"
|
||||||
|
>马上抢</view>
|
||||||
<view class="grab" v-if="item.status === 1 && itemSeckill.stock <= 0">已售磬</view>
|
<view class="grab" v-if="item.status === 1 && itemSeckill.stock <= 0">已售磬</view>
|
||||||
<view class="grab bg-color-red" v-if="item.status === 2">即将开始</view>
|
<view class="grab bg-color-red" v-if="item.status === 2">即将开始</view>
|
||||||
<view class="grab bg-color-red" v-if="item.status === 0">已结束</view>
|
<view class="grab bg-color-red" v-if="item.status === 0">已结束</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="noCommodity" style="background-color: #fff;" v-if="seckillList.length === 0 && page > 1">
|
<view
|
||||||
|
class="noCommodity"
|
||||||
|
style="background-color: #fff;"
|
||||||
|
v-if="seckillList.length === 0 && page > 1"
|
||||||
|
>
|
||||||
<view class="noPictrue">
|
<view class="noPictrue">
|
||||||
<image src="@/static/images/noGood.png" class="image" />
|
<image src="@/static/images/noGood.png" class="image" />
|
||||||
</view>
|
</view>
|
||||||
@@ -55,27 +75,24 @@
|
|||||||
<vant-tab :ellipsis="false" :title="[title[index]]">
|
<vant-tab :ellipsis="false" :title="[title[index]]">
|
||||||
|
|
||||||
</vant-tab>
|
</vant-tab>
|
||||||
</vant-tabs> -->
|
</vant-tabs>-->
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import {
|
import { getSeckillConfig, getSeckillList } from "@/api/activity";
|
||||||
getSeckillConfig,
|
import CountDown from "@/components/CountDown";
|
||||||
getSeckillList
|
// import { Tab, Tabs } from "vant-weapp";
|
||||||
} from '@/api/activity';
|
import Loading from "@/components/Loading";
|
||||||
import CountDown from '@/components/CountDown';
|
|
||||||
// import { Tab, Tabs } from "vant-weapp";
|
|
||||||
import Loading from '@/components/Loading';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'GoodsSeckill',
|
name: "GoodsSeckill",
|
||||||
components: {
|
components: {
|
||||||
CountDown
|
CountDown
|
||||||
},
|
},
|
||||||
props: {},
|
props: {},
|
||||||
data: function() {
|
data: function() {
|
||||||
return {
|
return {
|
||||||
headerImg: '',
|
headerImg: "",
|
||||||
timeList: [],
|
timeList: [],
|
||||||
sticky: false,
|
sticky: false,
|
||||||
loading: false,
|
loading: false,
|
||||||
@@ -86,7 +103,7 @@
|
|||||||
loadingList: false, //当前接口是否请求完成 false 完成 true 未完成
|
loadingList: false, //当前接口是否请求完成 false 完成 true 未完成
|
||||||
page: 1, //页码
|
page: 1, //页码
|
||||||
limit: 5, //数量
|
limit: 5, //数量
|
||||||
title: [],
|
title: []
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted: function() {
|
mounted: function() {
|
||||||
@@ -97,47 +114,54 @@
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
changeTime: function(index) {
|
changeTime: function(index) {
|
||||||
this.active = index
|
console.log(index);
|
||||||
|
this.active = index;
|
||||||
|
this.getSeckillList();
|
||||||
},
|
},
|
||||||
mountedStart: function() {
|
mountedStart: function() {
|
||||||
var that = this;
|
var that = this;
|
||||||
uni.showLoading();
|
uni.showLoading();
|
||||||
getSeckillConfig().then(res => {
|
getSeckillConfig().then(res => {
|
||||||
that.$set(that, 'headerImg', res.data.lovely);
|
that.$set(that, "headerImg", res.data.lovely);
|
||||||
that.$set(that, 'timeList', res.data.seckillTime);
|
that.$set(that, "timeList", res.data.seckillTime);
|
||||||
that.$set(that, 'active', res.data.seckillTimeIndex);
|
that.$set(that, "active", res.data.seckillTimeIndex);
|
||||||
|
|
||||||
let title = [];
|
let title = [];
|
||||||
title = res.data.seckillTime.map((item, index) => {
|
title = res.data.seckillTime.map((item, index) => {
|
||||||
return {
|
return {
|
||||||
name: 'div',
|
name: "div",
|
||||||
attrs: {
|
attrs: {
|
||||||
class: 'timeItem'
|
class: "timeItem"
|
||||||
},
|
},
|
||||||
children: [{
|
children: [
|
||||||
name: 'div',
|
{
|
||||||
|
name: "div",
|
||||||
attrs: {
|
attrs: {
|
||||||
class: 'time'
|
class: "time"
|
||||||
},
|
},
|
||||||
children: [{
|
children: [
|
||||||
type: 'text',
|
{
|
||||||
|
type: "text",
|
||||||
text: item.time
|
text: item.time
|
||||||
}]
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'div',
|
name: "div",
|
||||||
attrs: {
|
attrs: {
|
||||||
class: 'state'
|
class: "state"
|
||||||
},
|
},
|
||||||
children: [{
|
children: [
|
||||||
type: 'text',
|
{
|
||||||
|
type: "text",
|
||||||
text: item.state
|
text: item.state
|
||||||
}]
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
that.$set(that, 'title', title);
|
that.$set(that, "title", title);
|
||||||
that.datatime = that.timeList[that.active].stop;
|
that.datatime = that.timeList[that.active].stop;
|
||||||
that.getSeckillList();
|
that.getSeckillList();
|
||||||
that.$nextTick(function() {
|
that.$nextTick(function() {
|
||||||
@@ -146,10 +170,14 @@
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
setTime: function(event) {
|
setTime: function(index) {
|
||||||
var that = this;
|
var that = this;
|
||||||
that.active = event.mp.detail.index;
|
that.page = 1;
|
||||||
|
that.loadingList = false;
|
||||||
|
that.status = false;
|
||||||
|
that.active = index;
|
||||||
that.datatime = that.timeList[that.active].stop;
|
that.datatime = that.timeList[that.active].stop;
|
||||||
|
this.seckillList=[]
|
||||||
that.getSeckillList();
|
that.getSeckillList();
|
||||||
},
|
},
|
||||||
getSeckillList: function() {
|
getSeckillList: function() {
|
||||||
@@ -171,7 +199,7 @@
|
|||||||
var that = this;
|
var that = this;
|
||||||
var time = that.timeList[that.active].stop;
|
var time = that.timeList[that.active].stop;
|
||||||
this.$yrouter.push({
|
this.$yrouter.push({
|
||||||
path: '/pages/activity/SeckillDetails/index',
|
path: "/pages/activity/SeckillDetails/index",
|
||||||
query: {
|
query: {
|
||||||
id,
|
id,
|
||||||
time
|
time
|
||||||
@@ -179,16 +207,16 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="less">
|
<style scoped lang="less">
|
||||||
.timeScroll {
|
.timeScroll {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
}
|
}
|
||||||
|
|
||||||
.timeItem {
|
.timeItem {
|
||||||
font-size: 0.22 * 100rpx;
|
font-size: 0.22 * 100rpx;
|
||||||
color: #282828;
|
color: #282828;
|
||||||
width: 150rpx;
|
width: 150rpx;
|
||||||
@@ -197,9 +225,8 @@
|
|||||||
background-color: none;
|
background-color: none;
|
||||||
|
|
||||||
&.active {
|
&.active {
|
||||||
|
|
||||||
.time {
|
.time {
|
||||||
color: #00c17b
|
color: #00c17b;
|
||||||
}
|
}
|
||||||
|
|
||||||
.state {
|
.state {
|
||||||
@@ -207,32 +234,31 @@
|
|||||||
color: #fff;
|
color: #fff;
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
border-radius: 30rpx;
|
border-radius: 30rpx;
|
||||||
padding: 0 .2*100rpx;
|
padding: 0 0.2 * 100rpx;
|
||||||
font-weight: 800;
|
font-weight: 800;
|
||||||
height: .3*100rpx;
|
height: 0.37 * 100rpx;
|
||||||
line-height: .3*100rpx;
|
line-height: 0.37 * 100rpx;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
.timeItem .time {
|
||||||
}
|
|
||||||
|
|
||||||
.timeItem .time {
|
|
||||||
font-size: 0.32 * 100rpx;
|
font-size: 0.32 * 100rpx;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
height: 0.37 * 100rpx;
|
height: 0.37 * 100rpx;
|
||||||
line-height: 0.37 * 100rpx;
|
line-height: 0.37 * 100rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.timeItem .state {
|
.timeItem .state {
|
||||||
height: 0.37 * 100rpx;
|
height: 0.37 * 100rpx;
|
||||||
line-height: 0.37 * 100rpx;
|
line-height: 0.37 * 100rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.activity {
|
.activity {
|
||||||
color: #333;
|
color: #333;
|
||||||
}
|
}
|
||||||
|
|
||||||
.flash-sale .list .item .grab {
|
.flash-sale .list .item .grab {
|
||||||
background-color: #999;
|
background-color: #999;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -50,12 +50,12 @@
|
|||||||
<text>人成团</text>
|
<text>人成团</text>
|
||||||
</view>
|
</view>
|
||||||
<count-down
|
<count-down
|
||||||
:is-day="false"
|
:isDay="false"
|
||||||
:tip-text="'剩余 '"
|
:tipText="'剩余 '"
|
||||||
:day-text="''"
|
:dayText="false"
|
||||||
:hour-text="':'"
|
:hourText="':'"
|
||||||
:minute-text="':'"
|
:minuteText="':'"
|
||||||
:second-text="''"
|
:secondText="false"
|
||||||
:datatime="item.stopTime"
|
:datatime="item.stopTime"
|
||||||
></count-down>
|
></count-down>
|
||||||
</view>
|
</view>
|
||||||
@@ -104,12 +104,17 @@
|
|||||||
<view class="product-intro">
|
<view class="product-intro">
|
||||||
<view class="title">产品介绍</view>
|
<view class="title">产品介绍</view>
|
||||||
<view class="conter" v-html="storeInfo.description"></view>
|
<view class="conter" v-html="storeInfo.description"></view>
|
||||||
|
<!-- <view class="conter" v-html=""></view> -->
|
||||||
</view>
|
</view>
|
||||||
<view style="height:100rpx;"></view>
|
<view style="height:100rpx;"></view>
|
||||||
<view class="footer-group acea-row row-between-wrapper">
|
<view class="footer-group acea-row row-between-wrapper">
|
||||||
<view class="customerSer acea-row row-center-wrapper row-column">
|
<!-- <view class="customerSer acea-row row-center-wrapper row-column">
|
||||||
<view class="iconfont icon-kefu"></view>
|
<view class="iconfont icon-kefu"></view>
|
||||||
<view>客服</view>
|
<view>客服</view>
|
||||||
|
</view>-->
|
||||||
|
<view class="customerSer acea-row row-center-wrapper row-column" @click="setCollect">
|
||||||
|
<view class="iconfont" :class="userCollect ? 'icon-shoucang1' : 'icon-shoucang'"></view>
|
||||||
|
<text>收藏</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="bnt bg-color-violet" @click="openAlone">单独购买</view>
|
<view class="bnt bg-color-violet" @click="openAlone">单独购买</view>
|
||||||
<view class="bnt bg-color-red" @click="openTeam">立即开团</view>
|
<view class="bnt bg-color-red" @click="openTeam">立即开团</view>
|
||||||
@@ -134,6 +139,12 @@ import StorePoster from "@/components/StorePoster";
|
|||||||
import { getCombinationDetail } from "@/api/activity";
|
import { getCombinationDetail } from "@/api/activity";
|
||||||
import { postCartAdd } from "@/api/store";
|
import { postCartAdd } from "@/api/store";
|
||||||
import { imageBase64 } from "@/api/public";
|
import { imageBase64 } from "@/api/public";
|
||||||
|
import {
|
||||||
|
getCoupon,
|
||||||
|
getCollectAdd,
|
||||||
|
getCollectDel,
|
||||||
|
getUserInfo
|
||||||
|
} from "@/api/user";
|
||||||
const NAME = "GroupDetails";
|
const NAME = "GroupDetails";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -188,7 +199,8 @@ export default {
|
|||||||
cart_num: 1
|
cart_num: 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
cartNum: 1
|
cartNum: 1,
|
||||||
|
userCollect: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@@ -206,11 +218,27 @@ export default {
|
|||||||
openAlone: function() {
|
openAlone: function() {
|
||||||
this.$yrouter.replace({ path: "/detail/" + this.storeInfo.productId });
|
this.$yrouter.replace({ path: "/detail/" + this.storeInfo.productId });
|
||||||
},
|
},
|
||||||
|
//收藏商品
|
||||||
|
setCollect: function() {
|
||||||
|
let that = this,
|
||||||
|
id = that.storeInfo.id,
|
||||||
|
category = "product";
|
||||||
|
if (that.userCollect) {
|
||||||
|
getCollectDel(id, category).then(function() {
|
||||||
|
that.userCollect = !that.userCollect;
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
getCollectAdd(id, category).then(function() {
|
||||||
|
that.userCollect = !that.userCollect;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
mountedStart: function() {
|
mountedStart: function() {
|
||||||
var that = this;
|
var that = this;
|
||||||
console.log(that)
|
console.log(that);
|
||||||
let id = that.$yroute.query.id;
|
let id = that.$yroute.query.id;
|
||||||
getCombinationDetail(id).then(res => {
|
getCombinationDetail(id).then(res => {
|
||||||
|
that.userCollect = res.data.userCollect;
|
||||||
that.$set(that, "storeInfo", res.data.storeInfo);
|
that.$set(that, "storeInfo", res.data.storeInfo);
|
||||||
that.$set(that, "imgUrls", res.data.storeInfo.sliderImageArr);
|
that.$set(that, "imgUrls", res.data.storeInfo.sliderImageArr);
|
||||||
that.$set(that, "itemNew", res.data.pinkOkList);
|
that.$set(that, "itemNew", res.data.pinkOkList);
|
||||||
@@ -323,13 +351,14 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
<style scoped lang="less">
|
<style scoped lang="less">
|
||||||
.product-con .wrapper {
|
.product-con .wrapper {
|
||||||
padding-bottom: 0.26*100rpx;
|
padding-bottom: 0.26 * 100rpx;
|
||||||
}
|
}
|
||||||
.noscroll {
|
.noscroll {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
.product-con .footer-group .bnt {
|
.product-con .footer-group .bnt {
|
||||||
|
// flex:1;
|
||||||
width: 43%;
|
width: 43%;
|
||||||
}
|
}
|
||||||
.product-con .footer-group .bnt.bg-color-violet {
|
.product-con .footer-group .bnt.bg-color-violet {
|
||||||
|
|||||||
@@ -20,16 +20,28 @@
|
|||||||
<view class="line"></view>
|
<view class="line"></view>
|
||||||
<view class="name acea-row row-center-wrapper">
|
<view class="name acea-row row-center-wrapper">
|
||||||
<text>剩余</text>
|
<text>剩余</text>
|
||||||
<count-down :is-day="false" :tip-text="''" :day-text="''" :hour-text="' : '" :minute-text="' : '" :second-text="''"
|
<count-down
|
||||||
:datatime="pinkT.stopTime"></count-down>
|
:isDay="false"
|
||||||
|
:tipText="false"
|
||||||
|
:dayText="false"
|
||||||
|
:hourText="' : '"
|
||||||
|
:minuteText="' : '"
|
||||||
|
:secondText="false"
|
||||||
|
:datatime="pinkT.stopTime"
|
||||||
|
></count-down>
|
||||||
<text>结束</text>
|
<text>结束</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="line"></view>
|
<view class="line"></view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="tips-warp">
|
||||||
<text class="tips font-color-red" v-if="pinkBool === 1">恭喜您拼团成功</text>
|
<text class="tips font-color-red" v-if="pinkBool === 1">恭喜您拼团成功</text>
|
||||||
<text class="tips" v-else-if="pinkBool === -1">还差{{ count }}人,拼团失败</text>
|
<text class="tips" v-else-if="pinkBool === -1">还差{{ count }}人,拼团失败</text>
|
||||||
<text class="tips font-color-red" v-else-if="pinkBool === 0">拼团中,还差{{ count }}人拼团成功</text>
|
<text class="tips font-color-red" v-else-if="pinkBool === 0">拼团中,还差{{ count }}人拼团成功</text>
|
||||||
<view class="list acea-row row-middle" :class="[pinkBool === 1 || pinkBool === -1 ? 'result' : '',iShidden ? 'on' : '']">
|
</view>
|
||||||
|
<view
|
||||||
|
class="list acea-row row-middle"
|
||||||
|
:class="[pinkBool === 1 || pinkBool === -1 ? 'result' : '',iShidden ? 'on' : '']"
|
||||||
|
>
|
||||||
<view class="pictrue">
|
<view class="pictrue">
|
||||||
<image :src="pinkT.avatar" />
|
<image :src="pinkT.avatar" />
|
||||||
</view>
|
</view>
|
||||||
@@ -42,13 +54,29 @@
|
|||||||
<image class="img-none" src="@/static/images/vacancy.png" />
|
<image class="img-none" src="@/static/images/vacancy.png" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="(pinkBool === 1 || pinkBool === -1) && count > 9" class="lookAll acea-row row-center-wrapper" @click="lookAll">
|
<view
|
||||||
|
v-if="(pinkBool === 1 || pinkBool === -1) && count > 9"
|
||||||
|
class="lookAll acea-row row-center-wrapper"
|
||||||
|
@click="lookAll"
|
||||||
|
>
|
||||||
{{ iShidden ? "收起" : "查看全部" }}
|
{{ iShidden ? "收起" : "查看全部" }}
|
||||||
<text class="iconfont" :class="iShidden ? 'icon-xiangshang' : 'icon-xiangxia'"></text>
|
<text class="iconfont" :class="iShidden ? 'icon-xiangshang' : 'icon-xiangxia'"></text>
|
||||||
</view>
|
</view>
|
||||||
<view class="teamBnt bg-color-red" v-if="userBool === 1 && isOk == 0 && pinkBool === 0" @click="goPoster">邀请好友参团</view>
|
<view
|
||||||
<view class="teamBnt bg-color-red" v-else-if="userBool === 0 && pinkBool === 0 && count > 0" @click="pay">我要参团</view>
|
class="teamBnt bg-color-red"
|
||||||
<view class="teamBnt bg-color-red" v-if="pinkBool === 1 || pinkBool === -1" @click="goDetail(storeCombination.id)">再次开团</view>
|
v-if="userBool === 1 && isOk == 0 && pinkBool === 0"
|
||||||
|
@click="goPoster"
|
||||||
|
>邀请好友参团</view>
|
||||||
|
<view
|
||||||
|
class="teamBnt bg-color-red"
|
||||||
|
v-else-if="userBool === 0 && pinkBool === 0 && count > 0"
|
||||||
|
@click="pay"
|
||||||
|
>我要参团</view>
|
||||||
|
<view
|
||||||
|
class="teamBnt bg-color-red"
|
||||||
|
v-if="pinkBool === 1 || pinkBool === -1"
|
||||||
|
@click="goDetail(storeCombination.id)"
|
||||||
|
>再次开团</view>
|
||||||
<view class="cancel" @click="getCombinationRemove" v-if="pinkBool === 0 && userBool === 1">
|
<view class="cancel" @click="getCombinationRemove" v-if="pinkBool === 0 && userBool === 1">
|
||||||
<text class="iconfont icon-guanbi3"></text>
|
<text class="iconfont icon-guanbi3"></text>
|
||||||
<text>取消开团</text>
|
<text>取消开团</text>
|
||||||
@@ -61,22 +89,13 @@
|
|||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import CountDown from "@/components/CountDown";
|
import CountDown from "@/components/CountDown";
|
||||||
import {
|
import { getCombinationPink, getCombinationRemove } from "@/api/activity";
|
||||||
getCombinationPink,
|
import { postCartAdd } from "@/api/store";
|
||||||
getCombinationRemove
|
import { isWeixin, parseQuery, handleQrCode } from "@/utils/index";
|
||||||
} from "@/api/activity";
|
|
||||||
import {
|
|
||||||
postCartAdd
|
|
||||||
} from "@/api/store";
|
|
||||||
import {
|
|
||||||
isWeixin,
|
|
||||||
parseQuery,
|
|
||||||
handleQrCode
|
|
||||||
} from "@/utils/index";
|
|
||||||
|
|
||||||
const NAME = "GroupRule";
|
const NAME = "GroupRule";
|
||||||
export default {
|
export default {
|
||||||
name: NAME,
|
name: NAME,
|
||||||
components: {
|
components: {
|
||||||
CountDown
|
CountDown
|
||||||
@@ -137,7 +156,7 @@
|
|||||||
.catch(err => {
|
.catch(err => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: err.msg || err.response.data.msg,
|
title: err.msg || err.response.data.msg,
|
||||||
icon: 'none',
|
icon: "none",
|
||||||
duration: 2000
|
duration: 2000
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -216,5 +235,12 @@
|
|||||||
this.iShidden = !this.iShidden;
|
this.iShidden = !this.iShidden;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<style lang="less">
|
||||||
|
.tips-warp{
|
||||||
|
text-align: center;
|
||||||
|
margin-top: 20rpx;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
@@ -11,12 +11,12 @@
|
|||||||
<view class="times">
|
<view class="times">
|
||||||
<view>距秒杀结束仅剩</view>
|
<view>距秒杀结束仅剩</view>
|
||||||
<count-down
|
<count-down
|
||||||
:is-day="false"
|
:isDay="false"
|
||||||
:tip-text="''"
|
:tipText="false"
|
||||||
:day-text="''"
|
:dayText="false"
|
||||||
:hour-text="' : '"
|
:hourText="' : '"
|
||||||
:minute-text="' : '"
|
:minuteText="' : '"
|
||||||
:second-text="''"
|
:secondText="false"
|
||||||
:datatime="datatime"
|
:datatime="datatime"
|
||||||
></count-down>
|
></count-down>
|
||||||
</view>
|
</view>
|
||||||
@@ -39,13 +39,13 @@
|
|||||||
</view>
|
</view>
|
||||||
<view style="height:100rpx;"></view>
|
<view style="height:100rpx;"></view>
|
||||||
<view class="footerRush acea-row row-between-wrapper">
|
<view class="footerRush acea-row row-between-wrapper">
|
||||||
<view
|
<!-- <view
|
||||||
class="customerSer acea-row row-center-wrapper row-column"
|
class="customerSer acea-row row-center-wrapper row-column"
|
||||||
@click="routerGo()"
|
@click="routerGo()"
|
||||||
>
|
>
|
||||||
<view class="iconfont icon-kefu"></view>
|
<view class="iconfont icon-kefu"></view>
|
||||||
<view>客服</view>
|
<view>客服</view>
|
||||||
</view>
|
</view> -->
|
||||||
<view class="bnt bg-color-red" @click="tapBuy">立即购买</view>
|
<view class="bnt bg-color-red" @click="tapBuy">立即购买</view>
|
||||||
</view>
|
</view>
|
||||||
<ProductWindow v-on:changeFun="changeFun" :attr="attr" :cartNum="cartNum"></ProductWindow>
|
<ProductWindow v-on:changeFun="changeFun" :attr="attr" :cartNum="cartNum"></ProductWindow>
|
||||||
|
|||||||
@@ -43,7 +43,7 @@
|
|||||||
<image class="bg" src="../../static/images/index-bg.png" mode="widthFix"></image>
|
<image class="bg" src="../../static/images/index-bg.png" mode="widthFix"></image>
|
||||||
<view class="title acea-row row-between-wrapper">
|
<view class="title acea-row row-between-wrapper">
|
||||||
<view class="text"><view class="name line1">热门榜单</view></view>
|
<view class="text"><view class="name line1">热门榜单</view></view>
|
||||||
<view @click="goHotNewGoods()" class="more">
|
<view @click="goHotNewGoods(2)" class="more">
|
||||||
更多
|
更多
|
||||||
<text class="iconfont icon-jiantou"></text>
|
<text class="iconfont icon-jiantou"></text>
|
||||||
</view>
|
</view>
|
||||||
@@ -53,8 +53,8 @@
|
|||||||
<view class="newProductsScroll">
|
<view class="newProductsScroll">
|
||||||
<view @click="goGoodsCon(item)" class="newProductsItem" v-for="(item, likeInfoIndex) in likeInfo" :key="likeInfoIndex">
|
<view @click="goGoodsCon(item)" class="newProductsItem" v-for="(item, likeInfoIndex) in likeInfo" :key="likeInfoIndex">
|
||||||
<view class="img-box"><image :src="item.image" /></view>
|
<view class="img-box"><image :src="item.image" /></view>
|
||||||
<view class="pro-info line1">{{ item.storeName }}</view>
|
<view class="pro-info line1"><text>{{ item.storeName }}</text></view>
|
||||||
<view class="money font-color-red">¥{{ item.price }}</view>
|
<view class="money font-color-red"><text>¥{{ item.price }}</text></view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
@@ -99,7 +99,7 @@
|
|||||||
<view class="wrapper" v-if="benefit.length > 0">
|
<view class="wrapper" v-if="benefit.length > 0">
|
||||||
<view class="title acea-row row-between-wrapper">
|
<view class="title acea-row row-between-wrapper">
|
||||||
<view class="text"><view class="name line1">促销单品</view></view>
|
<view class="text"><view class="name line1">促销单品</view></view>
|
||||||
<view @click="goGoodsPromotion()" class="more">
|
<view @click="goGoodsPromotion(4)" class="more">
|
||||||
更多
|
更多
|
||||||
<text class="iconfont icon-jiantou"></text>
|
<text class="iconfont icon-jiantou"></text>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -107,31 +107,18 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="totalPrice">
|
<view class="totalPrice">
|
||||||
共{{ order.cartInfo.length || 0 }}件商品,总金额
|
共{{ order.cartInfo.length || 0 }}件商品,总金额
|
||||||
<text
|
<text class="money font-color-red">¥{{ order.payPrice }}</text>
|
||||||
class="money font-color-red"
|
|
||||||
>¥{{ order.payPrice }}</text>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="bottom acea-row row-right row-middle">
|
<view class="bottom acea-row row-right row-middle">
|
||||||
<template v-if="order._status._type == 0">
|
<template v-if="order._status._type == 0">
|
||||||
<view class="bnt cancelBnt" @click="cancelOrder(order)">取消订单</view>
|
<view class="bnt cancelBnt" @click="cancelOrder(order)">取消订单</view>
|
||||||
<view
|
<view class="bnt bg-color-red" @click="goOrderDetails(order)">立即付款</view>
|
||||||
class="bnt bg-color-red"
|
|
||||||
@click="goOrderDetails(order)"
|
|
||||||
>立即付款</view>
|
|
||||||
</template>
|
</template>
|
||||||
<template v-if="order._status._type == 1 || order._status._type == 9">
|
<template v-if="order._status._type == 1 || order._status._type == 9">
|
||||||
<view
|
<view class="bnt bg-color-red" @click="goOrderDetails(order)">查看详情</view>
|
||||||
class="bnt bg-color-red"
|
|
||||||
@click="goOrderDetails(order)"
|
|
||||||
>查看详情</view>
|
|
||||||
</template>
|
</template>
|
||||||
<template v-if="order._status._type == 2">
|
<template v-if="order._status._type == 2">
|
||||||
<view
|
<view class="bnt default" @click="goLogistics(order)">查看物流</view>
|
||||||
class="bnt default"
|
|
||||||
@click="
|
|
||||||
$yrouter.push({ path: '/pages/order/Logistics/index',query:{id:order.orderId}})
|
|
||||||
"
|
|
||||||
>查看物流</view>
|
|
||||||
<view class="bnt bg-color-red" @click="takeOrder(order)">确认收货</view>
|
<view class="bnt bg-color-red" @click="takeOrder(order)">确认收货</view>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="order._status._type == 3">
|
<template v-if="order._status._type == 3">
|
||||||
@@ -144,16 +131,10 @@
|
|||||||
<!-->-->
|
<!-->-->
|
||||||
<!--查看物流-->
|
<!--查看物流-->
|
||||||
<!--</view>-->
|
<!--</view>-->
|
||||||
<view
|
<view class="bnt bg-color-red" @click="goOrderDetails(order)">去评价</view>
|
||||||
class="bnt bg-color-red"
|
|
||||||
@click="goOrderDetails(order)"
|
|
||||||
>去评价</view>
|
|
||||||
</template>
|
</template>
|
||||||
<template v-if="order._status._type === 4">
|
<template v-if="order._status._type === 4">
|
||||||
<view
|
<view class="bnt bg-color-red" @click="goOrderDetails(order)">查看订单</view>
|
||||||
class="bnt bg-color-red"
|
|
||||||
@click="goOrderDetails(order)"
|
|
||||||
>查看订单</view>
|
|
||||||
</template>
|
</template>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -231,6 +212,12 @@ export default {
|
|||||||
type() {}
|
type() {}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
goLogistics(order) {
|
||||||
|
this.$yrouter.push({
|
||||||
|
path: "/pages/order/Logistics/index",
|
||||||
|
query: { id: order.orderId }
|
||||||
|
});
|
||||||
|
},
|
||||||
goOrderDetails(order) {
|
goOrderDetails(order) {
|
||||||
this.$yrouter.push({
|
this.$yrouter.push({
|
||||||
path: "/pages/order/OrderDetails/index",
|
path: "/pages/order/OrderDetails/index",
|
||||||
@@ -333,20 +320,21 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="less">
|
<style scoped lang="less">
|
||||||
|
|
||||||
.noCart {
|
.noCart {
|
||||||
margin-top: 0.17*100rpx;
|
margin-top: 0.17 * 100rpx;
|
||||||
padding-top: 0.1*100rpx;
|
padding-top: 0.1 * 100rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.noCart .pictrue {
|
.noCart .pictrue {
|
||||||
width: 4*100rpx;
|
width: 4 * 100rpx;
|
||||||
height: 3*100rpx;
|
height: 3 * 100rpx;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
margin: 0.7*100rpx auto 0.5*100rpx auto;
|
margin: 0.7 * 100rpx auto 0.5 * 100rpx auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.noCart .pictrue image{
|
.noCart .pictrue image {
|
||||||
width: 4*100rpx;
|
width: 4 * 100rpx;
|
||||||
height: 3*100rpx;
|
height: 3 * 100rpx;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
+185
-157
@@ -20,51 +20,75 @@
|
|||||||
<view :class="{ on: status.type === 4 }">已完成</view>
|
<view :class="{ on: status.type === 4 }">已完成</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="progress acea-row row-between-wrapper">
|
<view class="progress acea-row row-between-wrapper">
|
||||||
<view class="iconfont" :class="[
|
<view
|
||||||
|
class="iconfont"
|
||||||
|
:class="[
|
||||||
status.type === 0 || status.type === 9
|
status.type === 0 || status.type === 9
|
||||||
? 'icon-webicon318'
|
? 'icon-webicon318'
|
||||||
: 'icon-yuandianxiao',
|
: 'icon-yuandianxiao',
|
||||||
status.type >= 0 ? 'font-color-red' : ''
|
status.type >= 0 ? 'font-color-red' : ''
|
||||||
]"></view>
|
]"
|
||||||
|
></view>
|
||||||
<view class="line" :class="{ 'bg-color-red': status.type > 0 && status.type != 9 }"></view>
|
<view class="line" :class="{ 'bg-color-red': status.type > 0 && status.type != 9 }"></view>
|
||||||
<view class="iconfont" :class="[
|
<view
|
||||||
|
class="iconfont"
|
||||||
|
:class="[
|
||||||
status.type === 1 ? 'icon-webicon318' : 'icon-yuandianxiao',
|
status.type === 1 ? 'icon-webicon318' : 'icon-yuandianxiao',
|
||||||
status.type >= 1 && status.type != 6 && status.type != 9
|
status.type >= 1 && status.type != 6 && status.type != 9
|
||||||
? 'font-color-red'
|
? 'font-color-red'
|
||||||
: ''
|
: ''
|
||||||
]"></view>
|
]"
|
||||||
<view class="line" :class="{
|
></view>
|
||||||
|
<view
|
||||||
|
class="line"
|
||||||
|
:class="{
|
||||||
'bg-color-red':
|
'bg-color-red':
|
||||||
status.type > 1 && status.type != 6 && status.type != 9
|
status.type > 1 && status.type != 6 && status.type != 9
|
||||||
}"
|
}"
|
||||||
v-if="orderInfo.shipping_type === 1"></view>
|
v-if="orderInfo.shipping_type === 1"
|
||||||
<view class="iconfont" :class="[
|
></view>
|
||||||
|
<view
|
||||||
|
class="iconfont"
|
||||||
|
:class="[
|
||||||
status.type === 2 ? 'icon-webicon318' : 'icon-yuandianxiao',
|
status.type === 2 ? 'icon-webicon318' : 'icon-yuandianxiao',
|
||||||
status.type >= 2 && status.type != 6 && status.type != 9
|
status.type >= 2 && status.type != 6 && status.type != 9
|
||||||
? 'font-color-red'
|
? 'font-color-red'
|
||||||
: ''
|
: ''
|
||||||
]"
|
]"
|
||||||
v-if="orderInfo.shippingType === 1"></view>
|
v-if="orderInfo.shippingType === 1"
|
||||||
<view class="line" :class="{
|
></view>
|
||||||
|
<view
|
||||||
|
class="line"
|
||||||
|
:class="{
|
||||||
'bg-color-red':
|
'bg-color-red':
|
||||||
status.type > 2 && status.type != 6 && status.type != 9
|
status.type > 2 && status.type != 6 && status.type != 9
|
||||||
}"></view>
|
}"
|
||||||
<view class="iconfont" :class="[
|
></view>
|
||||||
|
<view
|
||||||
|
class="iconfont"
|
||||||
|
:class="[
|
||||||
status.type === 3 ? 'icon-webicon318' : 'icon-yuandianxiao',
|
status.type === 3 ? 'icon-webicon318' : 'icon-yuandianxiao',
|
||||||
status.type >= 3 && status.type != 6 && status.type != 9
|
status.type >= 3 && status.type != 6 && status.type != 9
|
||||||
? 'font-color-red'
|
? 'font-color-red'
|
||||||
: ''
|
: ''
|
||||||
]"></view>
|
]"
|
||||||
<view class="line" :class="{
|
></view>
|
||||||
|
<view
|
||||||
|
class="line"
|
||||||
|
:class="{
|
||||||
'bg-color-red':
|
'bg-color-red':
|
||||||
status.type > 3 && status.type != 6 && status.type != 9
|
status.type > 3 && status.type != 6 && status.type != 9
|
||||||
}"></view>
|
}"
|
||||||
<view class="iconfont" :class="[
|
></view>
|
||||||
|
<view
|
||||||
|
class="iconfont"
|
||||||
|
:class="[
|
||||||
status.type == 4 ? 'icon-webicon318' : 'icon-yuandianxiao',
|
status.type == 4 ? 'icon-webicon318' : 'icon-yuandianxiao',
|
||||||
status.type >= 4 && status.type != 6 && status.type != 9
|
status.type >= 4 && status.type != 6 && status.type != 9
|
||||||
? 'font-color-red'
|
? 'font-color-red'
|
||||||
: ''
|
: ''
|
||||||
]"></view>
|
]"
|
||||||
|
></view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!--<view-->
|
<!--<view-->
|
||||||
@@ -246,21 +270,30 @@
|
|||||||
<view class="bnt cancel" @click="goGoodsReturn(orderInfo)">申请退款</view>
|
<view class="bnt cancel" @click="goGoodsReturn(orderInfo)">申请退款</view>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="status.type == 2">
|
<template v-if="status.type == 2">
|
||||||
<view class="bnt default" @click="
|
<view
|
||||||
|
class="bnt default"
|
||||||
|
@click="
|
||||||
$yrouter.push({ path: '/pages/order/Logistics/index' ,query:{id:orderInfo.orderId }})
|
$yrouter.push({ path: '/pages/order/Logistics/index' ,query:{id:orderInfo.orderId }})
|
||||||
">查看物流</view>
|
"
|
||||||
|
>查看物流</view>
|
||||||
<view class="bnt bg-color-red" @click="takeOrder">确认收货</view>
|
<view class="bnt bg-color-red" @click="takeOrder">确认收货</view>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="status.type == 3 && orderInfo.deliveryType == 'express'">
|
<template v-if="status.type == 3 && orderInfo.deliveryType == 'express'">
|
||||||
<view class="bnt default" @click="
|
<view
|
||||||
|
class="bnt default"
|
||||||
|
@click="
|
||||||
$yrouter.push({ path: '/pages/order/Logistics/index' ,query:{id:orderInfo.orderId }})
|
$yrouter.push({ path: '/pages/order/Logistics/index' ,query:{id:orderInfo.orderId }})
|
||||||
">查看物流</view>
|
"
|
||||||
|
>查看物流</view>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="status.type == 4">
|
<template v-if="status.type == 4">
|
||||||
<view class="bnt cancel" @click="delOrder">删除订单</view>
|
<view class="bnt cancel" @click="delOrder">删除订单</view>
|
||||||
<view class="bnt default" @click="
|
<view
|
||||||
|
class="bnt default"
|
||||||
|
@click="
|
||||||
$yrouter.push({ path: '/pages/order/Logistics/index' ,query:{id:orderInfo.orderId }})
|
$yrouter.push({ path: '/pages/order/Logistics/index' ,query:{id:orderInfo.orderId }})
|
||||||
">查看物流</view>
|
"
|
||||||
|
>查看物流</view>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="status.type == 6">
|
<template v-if="status.type == 6">
|
||||||
<view class="bnt bg-color-red" @click="goGroupRule(orderInfo)">查看拼团</view>
|
<view class="bnt bg-color-red" @click="goGroupRule(orderInfo)">查看拼团</view>
|
||||||
@@ -268,190 +301,167 @@
|
|||||||
</view>
|
</view>
|
||||||
<Payment v-model="pay" :types="payType" @checked="toPay" :balance="userInfo.nowMoney"></Payment>
|
<Payment v-model="pay" :types="payType" @checked="toPay" :balance="userInfo.nowMoney"></Payment>
|
||||||
<view class="geoPage" v-if="mapShow">
|
<view class="geoPage" v-if="mapShow">
|
||||||
<iframe width="100%" height="100%" frameborder="0" scrolling="no" :src="'https://apis.map.qq.com/uri/v1/geocoder?coord=' + system_store.latitude + ',' +system_store.longitude +'&referer=' +mapKey"></iframe>
|
<iframe
|
||||||
|
width="100%"
|
||||||
|
height="100%"
|
||||||
|
frameborder="0"
|
||||||
|
scrolling="no"
|
||||||
|
:src="'https://apis.map.qq.com/uri/v1/geocoder?coord=' + system_store.latitude + ',' +system_store.longitude +'&referer=' +mapKey"
|
||||||
|
></iframe>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
methods: {
|
|
||||||
goGoodsReturn(orderInfo) {
|
|
||||||
this.$yrouter.push({
|
|
||||||
path: "/pages/order/GoodsReturn/index",
|
|
||||||
query: {
|
|
||||||
id: orderInfo.orderId
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
goGroupRule(orderInfo) {
|
|
||||||
this.$yrouter.push({
|
|
||||||
path: "/pages/activity/GroupRule/index",
|
|
||||||
query: {
|
|
||||||
id: orderInfo.pinkId
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
<style scoped lang="less">
|
<style scoped lang="less">
|
||||||
.geoPage {
|
.geoPage {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
top: 0;
|
top: 0;
|
||||||
z-index: 10000;
|
z-index: 10000;
|
||||||
}
|
}
|
||||||
|
|
||||||
.order-details .writeOff {
|
.order-details .writeOff {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
margin-top: 0.13*100rpx;
|
margin-top: 0.13 * 100rpx;
|
||||||
padding-bottom: 0.3*100rpx;
|
padding-bottom: 0.3 * 100rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.order-details .writeOff .title {
|
.order-details .writeOff .title {
|
||||||
font-size: 0.3*100rpx;
|
font-size: 0.3 * 100rpx;
|
||||||
color: #282828;
|
color: #282828;
|
||||||
height: 0.87*100rpx;
|
height: 0.87 * 100rpx;
|
||||||
border-bottom: 1px solid #f0f0f0;
|
border-bottom: 1px solid #f0f0f0;
|
||||||
padding: 0 0.3*100rpx;
|
padding: 0 0.3 * 100rpx;
|
||||||
line-height: 0.87*100rpx;
|
line-height: 0.87 * 100rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.order-details .writeOff .grayBg {
|
.order-details .writeOff .grayBg {
|
||||||
background-color: #f2f5f7;
|
background-color: #f2f5f7;
|
||||||
width: 5.9*100rpx;
|
width: 5.9 * 100rpx;
|
||||||
height: 3.84*100rpx;
|
height: 3.84 * 100rpx;
|
||||||
border-radius: 0.2*100rpx 0.2*100rpx 0 0;
|
border-radius: 0.2 * 100rpx 0.2 * 100rpx 0 0;
|
||||||
margin: 0.5*100rpx auto 0 auto;
|
margin: 0.5 * 100rpx auto 0 auto;
|
||||||
padding-top: 0.55*100rpx;
|
padding-top: 0.55 * 100rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.order-details .writeOff .grayBg .pictrue {
|
.order-details .writeOff .grayBg .pictrue {
|
||||||
width: 2.9*100rpx;
|
width: 2.9 * 100rpx;
|
||||||
height: 2.9*100rpx;
|
height: 2.9 * 100rpx;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.order-details .writeOff .grayBg .pictrue image {
|
.order-details .writeOff .grayBg .pictrue image {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.order-details .writeOff .gear {
|
.order-details .writeOff .gear {
|
||||||
width: 5.9*100rpx;
|
width: 5.9 * 100rpx;
|
||||||
height: 0.3*100rpx;
|
height: 0.3 * 100rpx;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.order-details .writeOff .gear image {
|
.order-details .writeOff .gear image {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.order-details .writeOff .num {
|
.order-details .writeOff .num {
|
||||||
background-color: #f0c34c;
|
background-color: #f0c34c;
|
||||||
width: 5.9*100rpx;
|
width: 5.9 * 100rpx;
|
||||||
height: 0.84*100rpx;
|
height: 0.84 * 100rpx;
|
||||||
color: #282828;
|
color: #282828;
|
||||||
font-size: 0.48*100rpx;
|
font-size: 0.48 * 100rpx;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
border-radius: 0 0 0.2*100rpx 0.2*100rpx;
|
border-radius: 0 0 0.2 * 100rpx 0.2 * 100rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding-top: 0.04*100rpx;
|
padding-top: 0.04 * 100rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.order-details .writeOff .rules {
|
.order-details .writeOff .rules {
|
||||||
margin: 0.46*100rpx 0.3*100rpx 0 0.3*100rpx;
|
margin: 0.46 * 100rpx 0.3 * 100rpx 0 0.3 * 100rpx;
|
||||||
border-top: 0.01*100rpx solid #f0f0f0;
|
border-top: 0.01 * 100rpx solid #f0f0f0;
|
||||||
padding-top: 0.1*100rpx;
|
padding-top: 0.1 * 100rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.order-details .writeOff .rules .item {
|
.order-details .writeOff .rules .item {
|
||||||
margin-top: 0.15*100rpx;
|
margin-top: 0.15 * 100rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.order-details .writeOff .rules .item .rulesTitle {
|
.order-details .writeOff .rules .item .rulesTitle {
|
||||||
font-size: 0.28*100rpx;
|
font-size: 0.28 * 100rpx;
|
||||||
color: #282828;
|
color: #282828;
|
||||||
}
|
}
|
||||||
|
|
||||||
.order-details .writeOff .rules .item .rulesTitle .iconfont {
|
.order-details .writeOff .rules .item .rulesTitle .iconfont {
|
||||||
font-size: 0.3*100rpx;
|
font-size: 0.3 * 100rpx;
|
||||||
color: #333;
|
color: #333;
|
||||||
margin-right: 0.08*100rpx;
|
margin-right: 0.08 * 100rpx;
|
||||||
margin-top: 0.05*100rpx;
|
margin-top: 0.05 * 100rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.order-details .writeOff .rules .item .info {
|
.order-details .writeOff .rules .item .info {
|
||||||
font-size: 0.28*100rpx;
|
font-size: 0.28 * 100rpx;
|
||||||
color: #999;
|
color: #999;
|
||||||
margin-top: 0.05*100rpx;
|
margin-top: 0.05 * 100rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.order-details .writeOff .rules .item .info .time {
|
.order-details .writeOff .rules .item .info .time {
|
||||||
margin-left: 0.2*100rpx;
|
margin-left: 0.2 * 100rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.order-details .map {
|
.order-details .map {
|
||||||
height: 0.86*100rpx;
|
height: 0.86 * 100rpx;
|
||||||
font-size: 0.3*100rpx;
|
font-size: 0.3 * 100rpx;
|
||||||
color: #282828;
|
color: #282828;
|
||||||
line-height: 0.86*100rpx;
|
line-height: 0.86 * 100rpx;
|
||||||
border-bottom: 1rpx solid #f0f0f0;
|
border-bottom: 1rpx solid #f0f0f0;
|
||||||
margin-top: 0.13*100rpx;
|
margin-top: 0.13 * 100rpx;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
padding: 0 0.3*100rpx;
|
padding: 0 0.3 * 100rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.order-details .map .place {
|
.order-details .map .place {
|
||||||
font-size: 0.26*100rpx;
|
font-size: 0.26 * 100rpx;
|
||||||
width: 1.76*100rpx;
|
width: 1.76 * 100rpx;
|
||||||
height: 0.5*100rpx;
|
height: 0.5 * 100rpx;
|
||||||
border-radius: 0.25*100rpx;
|
border-radius: 0.25 * 100rpx;
|
||||||
line-height: 0.5*100rpx;
|
line-height: 0.5 * 100rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.order-details .map .place .iconfont {
|
.order-details .map .place .iconfont {
|
||||||
font-size: 0.27*100rpx;
|
font-size: 0.27 * 100rpx;
|
||||||
height: 0.27*100rpx;
|
height: 0.27 * 100rpx;
|
||||||
line-height: 0.27*100rpx;
|
line-height: 0.27 * 100rpx;
|
||||||
margin: 0.02*100rpx 0.03*100rpx 0 0;
|
margin: 0.02 * 100rpx 0.03 * 100rpx 0 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.order-details .address .name .iconfont {
|
.order-details .address .name .iconfont {
|
||||||
font-size: 0.34*100rpx;
|
font-size: 0.34 * 100rpx;
|
||||||
margin-left: 0.1*100rpx;
|
margin-left: 0.1 * 100rpx;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
import OrderGoods from "@/components/OrderGoods";
|
import OrderGoods from "@/components/OrderGoods";
|
||||||
import {
|
import { orderDetail } from "@/api/order";
|
||||||
orderDetail
|
import Payment from "@/components/Payment";
|
||||||
} from "@/api/order";
|
import DataFormat from "@/components/DataFormat";
|
||||||
import Payment from "@/components/Payment";
|
import { isWeixin, copyClipboard } from "@/utils";
|
||||||
import DataFormat from "@/components/DataFormat";
|
import { mapGetters } from "vuex";
|
||||||
import {
|
import {
|
||||||
isWeixin,
|
|
||||||
copyClipboard
|
|
||||||
} from "@/utils";
|
|
||||||
import {
|
|
||||||
mapGetters
|
|
||||||
} from "vuex";
|
|
||||||
import {
|
|
||||||
cancelOrderHandle,
|
cancelOrderHandle,
|
||||||
takeOrderHandle,
|
takeOrderHandle,
|
||||||
delOrderHandle,
|
delOrderHandle,
|
||||||
payOrderHandle
|
payOrderHandle
|
||||||
} from "@/libs/order";
|
} from "@/libs/order";
|
||||||
// import { wechatEvevt } from "@/libs/wechat";
|
// import { wechatEvevt } from "@/libs/wechat";
|
||||||
|
|
||||||
const NAME = "OrderDetails";
|
const NAME = "OrderDetails";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: NAME,
|
name: NAME,
|
||||||
components: {
|
components: {
|
||||||
OrderGoods,
|
OrderGoods,
|
||||||
@@ -495,6 +505,23 @@
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
copyClipboard,
|
copyClipboard,
|
||||||
|
goGoodsReturn(orderInfo) {
|
||||||
|
this.$yrouter.push({
|
||||||
|
path: "/pages/order/GoodsReturn/index",
|
||||||
|
query: {
|
||||||
|
id: orderInfo.orderId
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
goGroupRule(orderInfo) {
|
||||||
|
console.log(orderInfo)
|
||||||
|
this.$yrouter.push({
|
||||||
|
path: "/pages/activity/GroupRule/index",
|
||||||
|
query: {
|
||||||
|
id: orderInfo.pinkId
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
showChang: function() {
|
showChang: function() {
|
||||||
// 这里判断是不是微信小程序
|
// 这里判断是不是微信小程序
|
||||||
if (isWeixin()) {
|
if (isWeixin()) {
|
||||||
@@ -508,10 +535,10 @@
|
|||||||
if (!this.mapKey)
|
if (!this.mapKey)
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: "暂无法使用查看地图,请配置您的腾讯地图key",
|
title: "暂无法使用查看地图,请配置您的腾讯地图key",
|
||||||
icon: 'none',
|
icon: "none",
|
||||||
duration: 2000
|
duration: 2000
|
||||||
});
|
});
|
||||||
return
|
return;
|
||||||
this.mapShow = true;
|
this.mapShow = true;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -519,7 +546,8 @@
|
|||||||
const history = this.app.history,
|
const history = this.app.history,
|
||||||
last = history[history.length - 1] || {};
|
last = history[history.length - 1] || {};
|
||||||
if (last.name === "MyOrder") return this.$yrouter.back();
|
if (last.name === "MyOrder") return this.$yrouter.back();
|
||||||
else return this.$yrouter.replace({
|
else
|
||||||
|
return this.$yrouter.replace({
|
||||||
path: "/order/list/"
|
path: "/order/list/"
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@@ -559,9 +587,9 @@
|
|||||||
delivery_type = orderInfo.deliveryType,
|
delivery_type = orderInfo.deliveryType,
|
||||||
seckill_id = orderInfo.seckillId ? parseInt(orderInfo.seckillId) : 0,
|
seckill_id = orderInfo.seckillId ? parseInt(orderInfo.seckillId) : 0,
|
||||||
bargain_id = orderInfo.bargainId ? parseInt(orderInfo.bargainId) : 0,
|
bargain_id = orderInfo.bargainId ? parseInt(orderInfo.bargainId) : 0,
|
||||||
combination_id = orderInfo.combinationId ?
|
combination_id = orderInfo.combinationId
|
||||||
parseInt(orderInfo.combinationId) :
|
? parseInt(orderInfo.combinationId)
|
||||||
0;
|
: 0;
|
||||||
status = {
|
status = {
|
||||||
type: type,
|
type: type,
|
||||||
class_status: 0
|
class_status: 0
|
||||||
@@ -592,10 +620,10 @@
|
|||||||
if (!id) {
|
if (!id) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: "订单不存在",
|
title: "订单不存在",
|
||||||
icon: 'none',
|
icon: "none",
|
||||||
duration: 2000
|
duration: 2000
|
||||||
});
|
});
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
orderDetail(id)
|
orderDetail(id)
|
||||||
.then(res => {
|
.then(res => {
|
||||||
@@ -629,5 +657,5 @@
|
|||||||
that.getDetail();
|
that.getDetail();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -58,7 +58,7 @@
|
|||||||
当前积分
|
当前积分
|
||||||
<text class="num font-color-red">{{ userInfo.integral || 0 }}</text>
|
<text class="num font-color-red">{{ userInfo.integral || 0 }}</text>
|
||||||
</text>
|
</text>
|
||||||
<checkbox value :checked="useIntegral ? true : false"></checkbox>
|
<checkbox value="true" :checked="useIntegral ? true : false"></checkbox>
|
||||||
</label>
|
</label>
|
||||||
</checkbox-group>
|
</checkbox-group>
|
||||||
</view>
|
</view>
|
||||||
@@ -345,6 +345,7 @@
|
|||||||
},
|
},
|
||||||
changeUseIntegral: function(e) {
|
changeUseIntegral: function(e) {
|
||||||
// this.computedPrice();
|
// this.computedPrice();
|
||||||
|
console.log(e)
|
||||||
this.useIntegral = e.mp.detail.value[0];
|
this.useIntegral = e.mp.detail.value[0];
|
||||||
},
|
},
|
||||||
computedPrice() {
|
computedPrice() {
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
<view class="num">{{ census.orderCount.evaluatedCount }}</view>
|
<view class="num">{{ census.orderCount.evaluatedCount }}</view>
|
||||||
<view>待评价</view>
|
<view>待评价</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item" @click="goAdminOrderList(3)">
|
<view class="item" @click="goAdminOrderList(4)">
|
||||||
<view class="num">{{ census.orderCount.refundCount }}</view>
|
<view class="num">{{ census.orderCount.refundCount }}</view>
|
||||||
<view>退款</view>
|
<view>退款</view>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -20,8 +20,8 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="conter">
|
<view class="conter">
|
||||||
<view class="listw" v-for="(item, eq) in category" :key="eq">
|
<view v-for="(item, eq) in category" :key="eq">
|
||||||
<view v-if="eq === navActive">
|
<view class="listw" v-if="eq === navActive">
|
||||||
<view class="title acea-row row-center-wrapper" ref="title">
|
<view class="title acea-row row-center-wrapper" ref="title">
|
||||||
<view class="line"></view>
|
<view class="line"></view>
|
||||||
<view class="name">{{ item.cateName }}</view>
|
<view class="name">{{ item.cateName }}</view>
|
||||||
|
|||||||
+176
-166
@@ -6,8 +6,15 @@
|
|||||||
<view class="money font-color-red">
|
<view class="money font-color-red">
|
||||||
<text>¥</text>
|
<text>¥</text>
|
||||||
<text class="num">{{ storeInfo.price }}</text>
|
<text class="num">{{ storeInfo.price }}</text>
|
||||||
<text class="vip-money" v-if="storeInfo.vipPrice && storeInfo.vipPrice > 0">¥{{ storeInfo.vipPrice }}</text>
|
<text
|
||||||
<image src="@/static/images/vip.png" class="image" v-if="storeInfo.vipPrice && storeInfo.vipPrice > 0" />
|
class="vip-money"
|
||||||
|
v-if="storeInfo.vipPrice && storeInfo.vipPrice > 0"
|
||||||
|
>¥{{ storeInfo.vipPrice }}</text>
|
||||||
|
<image
|
||||||
|
src="@/static/images/vip.png"
|
||||||
|
class="image"
|
||||||
|
v-if="storeInfo.vipPrice && storeInfo.vipPrice > 0"
|
||||||
|
/>
|
||||||
</view>
|
</view>
|
||||||
<view class="iconfont icon-fenxiang" @click="listenerActionSheet"></view>
|
<view class="iconfont icon-fenxiang" @click="listenerActionSheet"></view>
|
||||||
</view>
|
</view>
|
||||||
@@ -20,7 +27,11 @@
|
|||||||
<view class="coupon acea-row row-between-wrapper" @click="couponTap" v-if="couponList.length">
|
<view class="coupon acea-row row-between-wrapper" @click="couponTap" v-if="couponList.length">
|
||||||
<text class="hide line1 acea-row">
|
<text class="hide line1 acea-row">
|
||||||
<text>优惠券:</text>
|
<text>优惠券:</text>
|
||||||
<text class="activity" v-for="(item, couponListEq) in couponList" :key="couponListEq">满{{ item.use_min_price }}减{{ item.coupon_price }}</text>
|
<text
|
||||||
|
class="activity"
|
||||||
|
v-for="(item, couponListEq) in couponList"
|
||||||
|
:key="couponListEq"
|
||||||
|
>满{{ item.use_min_price }}减{{ item.coupon_price }}</text>
|
||||||
</text>
|
</text>
|
||||||
<view class="iconfont icon-jiantou"></view>
|
<view class="iconfont icon-jiantou"></view>
|
||||||
</view>
|
</view>
|
||||||
@@ -99,7 +110,11 @@
|
|||||||
<view class="iconfont" :class="storeInfo.userCollect ? 'icon-shoucang1' : 'icon-shoucang'"></view>
|
<view class="iconfont" :class="storeInfo.userCollect ? 'icon-shoucang1' : 'icon-shoucang'"></view>
|
||||||
<text>收藏</text>
|
<text>收藏</text>
|
||||||
</view>
|
</view>
|
||||||
<view @click="goShoppingCart()" class="item animated" :class="animated === true ? 'bounceIn' : ''">
|
<view
|
||||||
|
@click="goShoppingCart()"
|
||||||
|
class="item animated"
|
||||||
|
:class="animated === true ? 'bounceIn' : ''"
|
||||||
|
>
|
||||||
<view class="iconfont icon-gouwuche1">
|
<view class="iconfont icon-gouwuche1">
|
||||||
<text class="num bg-color-red" v-if="CartCount > 0">{{CartCount}}</text>
|
<text class="num bg-color-red" v-if="CartCount > 0">{{CartCount}}</text>
|
||||||
</view>
|
</view>
|
||||||
@@ -116,7 +131,11 @@
|
|||||||
</view>
|
</view>
|
||||||
<CouponPop v-on:changeFun="changeFun" :coupon="coupon"></CouponPop>
|
<CouponPop v-on:changeFun="changeFun" :coupon="coupon"></CouponPop>
|
||||||
<ProductWindow v-on:changeFun="changeFun" :attr="attr" :cartNum="cart_num"></ProductWindow>
|
<ProductWindow v-on:changeFun="changeFun" :attr="attr" :cartNum="cart_num"></ProductWindow>
|
||||||
<StorePoster v-on:setPosterImageStatus="setPosterImageStatus" :posterImageStatus="posterImageStatus" :posterData="posterData"></StorePoster>
|
<StorePoster
|
||||||
|
v-on:setPosterImageStatus="setPosterImageStatus"
|
||||||
|
:posterImageStatus="posterImageStatus"
|
||||||
|
:posterData="posterData"
|
||||||
|
></StorePoster>
|
||||||
<ShareInfo v-on:setShareInfoStatus="setShareInfoStatus" :shareInfoStatus="shareInfoStatus"></ShareInfo>
|
<ShareInfo v-on:setShareInfoStatus="setShareInfoStatus" :shareInfoStatus="shareInfoStatus"></ShareInfo>
|
||||||
<view class="generate-posters acea-row row-middle" :class="posters ? 'on' : ''">
|
<view class="generate-posters acea-row row-middle" :class="posters ? 'on' : ''">
|
||||||
<view class="item" v-if="weixinStatus === true" @click="setShareInfoStatus">
|
<view class="item" v-if="weixinStatus === true" @click="setShareInfoStatus">
|
||||||
@@ -130,46 +149,47 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="mask" @touchmove.prevent @click="listenerActionClose" v-show="posters"></view>
|
<view class="mask" @touchmove.prevent @click="listenerActionClose" v-show="posters"></view>
|
||||||
<view class="geoPage" v-if="mapShow">
|
<view class="geoPage" v-if="mapShow">
|
||||||
<iframe width="100%" height="100%" frameborder="0" scrolling="no" :src="'https://apis.map.qq.com/uri/v1/geocoder?coord=' +system_store.latitude +',' +system_store.longitude +'&referer=' +mapKey"></iframe>
|
<iframe
|
||||||
|
width="100%"
|
||||||
|
height="100%"
|
||||||
|
frameborder="0"
|
||||||
|
scrolling="no"
|
||||||
|
:src="'https://apis.map.qq.com/uri/v1/geocoder?coord=' +system_store.latitude +',' +system_store.longitude +'&referer=' +mapKey"
|
||||||
|
></iframe>
|
||||||
</view>
|
</view>
|
||||||
|
<div class="posterCanvasWarp">
|
||||||
|
<canvas class="posterCanvas" canvas-id="myCanvas"></canvas>
|
||||||
|
</div>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
// import { swiper, swiperSlide } from "vue-awesome-swiper";
|
// import { swiper, swiperSlide } from "vue-awesome-swiper";
|
||||||
|
|
||||||
import ProductConSwiper from "@/components/ProductConSwiper";
|
import ProductConSwiper from "@/components/ProductConSwiper";
|
||||||
import UserEvaluation from "@/components/UserEvaluation";
|
import UserEvaluation from "@/components/UserEvaluation";
|
||||||
import CouponPop from "@/components/CouponPop";
|
import CouponPop from "@/components/CouponPop";
|
||||||
import ProductWindow from "@/components/ProductWindow";
|
import ProductWindow from "@/components/ProductWindow";
|
||||||
import StorePoster from "@/components/StorePoster";
|
import StorePoster from "@/components/StorePoster";
|
||||||
import ShareInfo from "@/components/ShareInfo";
|
import ShareInfo from "@/components/ShareInfo";
|
||||||
import {
|
import {
|
||||||
getProductDetail,
|
getProductDetail,
|
||||||
postCartAdd,
|
postCartAdd,
|
||||||
getCartCount,
|
getCartCount,
|
||||||
getProductCode
|
getProductCode
|
||||||
} from "@/api/store";
|
} from "@/api/store";
|
||||||
import {
|
import {
|
||||||
getCoupon,
|
getCoupon,
|
||||||
getCollectAdd,
|
getCollectAdd,
|
||||||
getCollectDel,
|
getCollectDel,
|
||||||
getUserInfo
|
getUserInfo
|
||||||
} from "@/api/user";
|
} from "@/api/user";
|
||||||
import {
|
import { isWeixin, PosterCanvas, handleQrCode } from "@/utils";
|
||||||
isWeixin,
|
// import { wechatEvevt } from "@/libs/wechat";
|
||||||
PosterCanvas,
|
import { imageBase64 } from "@/api/public";
|
||||||
handleQrCode
|
import { mapGetters } from "vuex";
|
||||||
} from "@/utils";
|
|
||||||
// import { wechatEvevt } from "@/libs/wechat";
|
|
||||||
import {
|
|
||||||
imageBase64
|
|
||||||
} from "@/api/public";
|
|
||||||
import {
|
|
||||||
mapGetters
|
|
||||||
} from "vuex";
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "GoodsCon",
|
name: "GoodsCon",
|
||||||
components: {
|
components: {
|
||||||
// swiper,
|
// swiper,
|
||||||
@@ -237,7 +257,7 @@
|
|||||||
},
|
},
|
||||||
computed: mapGetters(["isLogin"]),
|
computed: mapGetters(["isLogin"]),
|
||||||
mounted: function() {
|
mounted: function() {
|
||||||
console.log(this)
|
console.log(this);
|
||||||
let url = handleQrCode();
|
let url = handleQrCode();
|
||||||
console.log(url);
|
console.log(url);
|
||||||
if (url && url.productId) {
|
if (url && url.productId) {
|
||||||
@@ -305,11 +325,11 @@
|
|||||||
//产品详情接口;
|
//产品详情接口;
|
||||||
productCon: function() {
|
productCon: function() {
|
||||||
let that = this;
|
let that = this;
|
||||||
let form = {}
|
let form = {};
|
||||||
if (this.$deviceType == 'app') {
|
if (this.$deviceType == "app") {
|
||||||
form.form = 'app'
|
form.form = "app";
|
||||||
}
|
}
|
||||||
console.log(form, 2222)
|
console.log(form, 2222);
|
||||||
getProductDetail(that.id, form)
|
getProductDetail(that.id, form)
|
||||||
.then(res => {
|
.then(res => {
|
||||||
that.$set(that, "storeInfo", res.data.storeInfo);
|
that.$set(that, "storeInfo", res.data.storeInfo);
|
||||||
@@ -485,27 +505,15 @@
|
|||||||
},
|
},
|
||||||
//选择属性;
|
//选择属性;
|
||||||
ChangeAttr: function(res) {
|
ChangeAttr: function(res) {
|
||||||
let productSelectValue = this.productValue[res];
|
let productSelect = this.productValue[res.value];
|
||||||
if (productSelectValue) {
|
if (productSelect) {
|
||||||
let productSelect = {
|
this.attr.productAttr[res.indexw].index = res.indexn;
|
||||||
...this.attr.productSelect,
|
this.$set(this.attr.productSelect, "image", productSelect.image);
|
||||||
image: productSelectValue.image,
|
this.$set(this.attr.productSelect, "price", productSelect.price);
|
||||||
price: productSelectValue.price,
|
this.$set(this.attr.productSelect, "stock", productSelect.stock);
|
||||||
stock: productSelectValue.stock,
|
this.$set(this.attr.productSelect, "unique", productSelect.unique);
|
||||||
unique: productSelectValue.unique,
|
this.$set(this.attr.productSelect, "cart_num", 1);
|
||||||
cart_num: 1
|
this.$set(this, "attrValue", res.value);
|
||||||
};
|
|
||||||
let attr = {
|
|
||||||
...this.attr,
|
|
||||||
productSelect
|
|
||||||
};
|
|
||||||
this.attr = attr;
|
|
||||||
// this.$set(this.attr.productSelect, "image", productSelect.image);
|
|
||||||
// this.$set(this.attr.productSelect, "price", productSelect.price);
|
|
||||||
// this.$set(this.attr.productSelect, "stock", productSelect.stock);
|
|
||||||
// this.$set(this.attr.productSelect, "unique", productSelect.unique);
|
|
||||||
// this.$set(this.attr.productSelect, "cart_num", 1);
|
|
||||||
this.$set(this, "attrValue", res);
|
|
||||||
this.$set(this, "attrTxt", "已选择");
|
this.$set(this, "attrTxt", "已选择");
|
||||||
} else {
|
} else {
|
||||||
this.$set(this.attr.productSelect, "image", this.storeInfo.image);
|
this.$set(this.attr.productSelect, "image", this.storeInfo.image);
|
||||||
@@ -569,8 +577,10 @@
|
|||||||
productId: that.id,
|
productId: that.id,
|
||||||
cartNum: that.attr.productSelect.cart_num,
|
cartNum: that.attr.productSelect.cart_num,
|
||||||
new: news,
|
new: news,
|
||||||
uniqueId: that.attr.productSelect !== undefined ?
|
uniqueId:
|
||||||
that.attr.productSelect.unique : ""
|
that.attr.productSelect !== undefined
|
||||||
|
? that.attr.productSelect.unique
|
||||||
|
: ""
|
||||||
};
|
};
|
||||||
postCartAdd(q)
|
postCartAdd(q)
|
||||||
.then(function(res) {
|
.then(function(res) {
|
||||||
@@ -637,169 +647,169 @@
|
|||||||
this.posters = false;
|
this.posters = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
<style scoped lang="less">
|
<style scoped lang="less">
|
||||||
.geoPage {
|
.geoPage {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
top: 0;
|
top: 0;
|
||||||
z-index: 10000;
|
z-index: 10000;
|
||||||
}
|
}
|
||||||
|
|
||||||
.product-con .store-info {
|
.product-con .store-info {
|
||||||
margin-top: 0.2*100rpx;
|
margin-top: 0.2 * 100rpx;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.product-con .store-info .title {
|
.product-con .store-info .title {
|
||||||
padding: 0 0.3*100rpx;
|
padding: 0 0.3 * 100rpx;
|
||||||
font-size: 0.28*100rpx;
|
font-size: 0.28 * 100rpx;
|
||||||
color: #282828;
|
color: #282828;
|
||||||
height: 0.8*100rpx;
|
height: 0.8 * 100rpx;
|
||||||
line-height: 0.8*100rpx;
|
line-height: 0.8 * 100rpx;
|
||||||
border-bottom: 0.01*100rpx solid #f5f5f5;
|
border-bottom: 0.01 * 100rpx solid #f5f5f5;
|
||||||
}
|
}
|
||||||
|
|
||||||
.product-con .store-info .info {
|
.product-con .store-info .info {
|
||||||
padding: 0 0.3*100rpx;
|
padding: 0 0.3 * 100rpx;
|
||||||
height: 1.26*100rpx;
|
height: 1.26 * 100rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.product-con .store-info .info .picTxt {
|
.product-con .store-info .info .picTxt {
|
||||||
width: 6.15*100rpx;
|
width: 6.15 * 100rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.product-con .store-info .info .picTxt .pictrue {
|
.product-con .store-info .info .picTxt .pictrue {
|
||||||
width: 0.76*100rpx;
|
width: 0.76 * 100rpx;
|
||||||
height: 0.76*100rpx;
|
height: 0.76 * 100rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.product-con .store-info .info .picTxt .pictrue image {
|
.product-con .store-info .info .picTxt .pictrue image {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
border-radius: 0.06*100rpx;
|
border-radius: 0.06 * 100rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.product-con .store-info .info .picTxt .text {
|
.product-con .store-info .info .picTxt .text {
|
||||||
width: 5.22*100rpx;
|
width: 5.22 * 100rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.product-con .store-info .info .picTxt .text .name {
|
.product-con .store-info .info .picTxt .text .name {
|
||||||
font-size: 0.3*100rpx;
|
font-size: 0.3 * 100rpx;
|
||||||
color: #282828;
|
color: #282828;
|
||||||
}
|
}
|
||||||
|
|
||||||
.product-con .store-info .info .picTxt .text .address {
|
.product-con .store-info .info .picTxt .text .address {
|
||||||
font-size: 0.24*100rpx;
|
font-size: 0.24 * 100rpx;
|
||||||
color: #666;
|
color: #666;
|
||||||
margin-top: 0.03*100rpx;
|
margin-top: 0.03 * 100rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.product-con .store-info .info .picTxt .text .address .iconfont {
|
.product-con .store-info .info .picTxt .text .address .iconfont {
|
||||||
color: #707070;
|
color: #707070;
|
||||||
font-size: 0.18*100rpx;
|
font-size: 0.18 * 100rpx;
|
||||||
margin-left: 0.1*100rpx;
|
margin-left: 0.1 * 100rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.product-con .store-info .info .picTxt .text .address .addressTxt {
|
.product-con .store-info .info .picTxt .text .address .addressTxt {
|
||||||
width: 4.8*100rpx;
|
width: 4.8 * 100rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.product-con .store-info .info .iconfont {
|
.product-con .store-info .info .iconfont {
|
||||||
font-size: 0.4*100rpx;
|
font-size: 0.4 * 100rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.product-con .superior {
|
.product-con .superior {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
margin-top: 0.2*100rpx;
|
margin-top: 0.2 * 100rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.product-con .superior .title {
|
.product-con .superior .title {
|
||||||
height: 0.98*100rpx;
|
height: 0.98 * 100rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.product-con .superior .title image {
|
.product-con .superior .title image {
|
||||||
width: 0.3*100rpx;
|
width: 0.3 * 100rpx;
|
||||||
height: 0.3*100rpx;
|
height: 0.3 * 100rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.product-con .superior .title .titleTxt {
|
.product-con .superior .title .titleTxt {
|
||||||
margin: 0 0.2*100rpx;
|
margin: 0 0.2 * 100rpx;
|
||||||
font-size: 0.3*100rpx;
|
font-size: 0.3 * 100rpx;
|
||||||
background-image: linear-gradient(to right, #f57a37 0%, #f21b07 100%);
|
background-image: linear-gradient(to right, #f57a37 0%, #f21b07 100%);
|
||||||
background-image: -webkit-linear-gradient(to right, #f57a37 0%, #f21b07 100%);
|
background-image: -webkit-linear-gradient(to right, #f57a37 0%, #f21b07 100%);
|
||||||
background-image: -moz-linear-gradient(to right, #f57a37 0%, #f21b07 100%);
|
background-image: -moz-linear-gradient(to right, #f57a37 0%, #f21b07 100%);
|
||||||
-webkit-background-clip: text;
|
-webkit-background-clip: text;
|
||||||
-webkit-text-fill-color: transparent;
|
-webkit-text-fill-color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
.product-con .superior .slider-banner {
|
.product-con .superior .slider-banner {
|
||||||
width: 6.9*100rpx;
|
width: 6.9 * 100rpx;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
padding-bottom: 0.2*100rpx;
|
padding-bottom: 0.2 * 100rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.product-con .superior .slider-banner .list {
|
.product-con .superior .slider-banner .list {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding-bottom: 0.2*100rpx;
|
padding-bottom: 0.2 * 100rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.product-con .superior .slider-banner .list .item {
|
.product-con .superior .slider-banner .list .item {
|
||||||
width: 2.15*100rpx;
|
width: 2.15 * 100rpx;
|
||||||
margin: 0 0.22*100rpx 0.3*100rpx 0;
|
margin: 0 0.22 * 100rpx 0.3 * 100rpx 0;
|
||||||
font-size: 0.26*100rpx;
|
font-size: 0.26 * 100rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.product-con .superior .slider-banner .list .item:nth-of-type(3n) {
|
.product-con .superior .slider-banner .list .item:nth-of-type(3n) {
|
||||||
margin-right: 0;
|
margin-right: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.product-con .superior .slider-banner .list .item .pictrue {
|
.product-con .superior .slider-banner .list .item .pictrue {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 2.15*100rpx;
|
height: 2.15 * 100rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.product-con .superior .slider-banner .list .item .pictrue image {
|
.product-con .superior .slider-banner .list .item .pictrue image {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
border-radius: 0.06*100rpx;
|
border-radius: 0.06 * 100rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.product-con .superior .slider-banner .list .item .name {
|
.product-con .superior .slider-banner .list .item .name {
|
||||||
color: #282828;
|
color: #282828;
|
||||||
margin-top: 0.12*100rpx;
|
margin-top: 0.12 * 100rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.product-con .superior .slider-banner .swiper-pagination-bullet {
|
.product-con .superior .slider-banner .swiper-pagination-bullet {
|
||||||
background-color: #999;
|
background-color: #999;
|
||||||
}
|
}
|
||||||
|
|
||||||
.product-con .superior .slider-banner .swiper-pagination-bullet-active {
|
.product-con .superior .slider-banner .swiper-pagination-bullet-active {
|
||||||
background-color: #e93323;
|
background-color: #e93323;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mask {
|
.mask {
|
||||||
-webkit-filter: blur(2px);
|
-webkit-filter: blur(2px);
|
||||||
-moz-filter: blur(2px);
|
-moz-filter: blur(2px);
|
||||||
-ms-filter: blur(2px);
|
-ms-filter: blur(2px);
|
||||||
filter: blur(2px);
|
filter: blur(2px);
|
||||||
}
|
}
|
||||||
|
|
||||||
.footer .icon-shoucang1 {
|
.footer .icon-shoucang1 {
|
||||||
color: #00c17b;
|
color: #00c17b;
|
||||||
}
|
}
|
||||||
|
|
||||||
.product-con .product-intro .conter view {
|
.product-con .product-intro .conter view {
|
||||||
width: 100% !important;
|
width: 100% !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.generate-posters {
|
.generate-posters {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 1.7*100rpx;
|
height: 1.7 * 100rpx;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
left: 0;
|
left: 0;
|
||||||
@@ -814,34 +824,34 @@
|
|||||||
-webkit-transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9);
|
-webkit-transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9);
|
||||||
-moz-transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9);
|
-moz-transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9);
|
||||||
-o-transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9);
|
-o-transition: all 0.3s cubic-bezier(0.25, 0.5, 0.5, 0.9);
|
||||||
}
|
}
|
||||||
|
|
||||||
.generate-posters.on {
|
.generate-posters.on {
|
||||||
transform: translate3d(0, 0, 0);
|
transform: translate3d(0, 0, 0);
|
||||||
-webkit-transform: translate3d(0, 0, 0);
|
-webkit-transform: translate3d(0, 0, 0);
|
||||||
-ms-transform: translate3d(0, 0, 0);
|
-ms-transform: translate3d(0, 0, 0);
|
||||||
-moz-transform: translate3d(0, 0, 0);
|
-moz-transform: translate3d(0, 0, 0);
|
||||||
-o-transform: translate3d(0, 0, 0);
|
-o-transform: translate3d(0, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
.generate-posters .item {
|
.generate-posters .item {
|
||||||
flex: 50%;
|
flex: 50%;
|
||||||
-webkit-flex: 50%;
|
-webkit-flex: 50%;
|
||||||
-ms-flex: 50%;
|
-ms-flex: 50%;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.generate-posters .item .iconfont {
|
.generate-posters .item .iconfont {
|
||||||
font-size: 0.8*100rpx;
|
font-size: 0.8 * 100rpx;
|
||||||
color: #5eae72;
|
color: #5eae72;
|
||||||
}
|
}
|
||||||
|
|
||||||
.generate-posters .item .iconfont.icon-haibao {
|
.generate-posters .item .iconfont.icon-haibao {
|
||||||
color: #5391f1;
|
color: #5391f1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.noscroll {
|
.noscroll {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ export default {
|
|||||||
} else if (type === "2") {
|
} else if (type === "2") {
|
||||||
this.name = "热门榜单";
|
this.name = "热门榜单";
|
||||||
this.icon = "icon-remen";
|
this.icon = "icon-remen";
|
||||||
document.title = "热门榜单";
|
// document.title = "热门榜单";
|
||||||
} else if (type === "3") {
|
} else if (type === "3") {
|
||||||
this.name = "首发新品";
|
this.name = "首发新品";
|
||||||
this.icon = "icon-xinpin";
|
this.icon = "icon-xinpin";
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="shoppingCart">
|
<view class="shoppingCart">
|
||||||
<view class v-if="userInfo.uid">
|
<view v-if="$store.getters.token||userInfo.uid">
|
||||||
<view class="labelNav acea-row row-around row-middle">
|
<view class="labelNav acea-row row-around row-middle">
|
||||||
<view class="item">
|
<view class="item">
|
||||||
<text class="iconfont icon-xuanzhong"></text>
|
<text class="iconfont icon-xuanzhong"></text>
|
||||||
@@ -130,7 +130,7 @@
|
|||||||
<view class="placeOrder bg-color-red" @click="placeOrder">立即下单</view>
|
<view class="placeOrder bg-color-red" @click="placeOrder">立即下单</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="button acea-row row-middle" v-else>
|
<view class="button acea-row row-middle" v-else>
|
||||||
<view class="bnt cart-color" @click="collectAll">收藏</view>
|
<!-- <view class="bnt cart-color" @click="collectAll">收藏</view> -->
|
||||||
<view class="bnt" @click="delgoods">删除</view>
|
<view class="bnt" @click="delgoods">删除</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
+75
-55
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="user">
|
<view class="user">
|
||||||
<view v-if="userInfo.uid">
|
<view v-if="$store.getters.token||userInfo.uid">
|
||||||
<view class="header bg-color-red acea-row row-between-wrapper">
|
<view class="header bg-color-red acea-row row-between-wrapper">
|
||||||
<view class="picTxt acea-row row-between-wrapper">
|
<view class="picTxt acea-row row-between-wrapper">
|
||||||
<view class="pictrue">
|
<view class="pictrue">
|
||||||
@@ -18,7 +18,12 @@
|
|||||||
<text>ID:{{ userInfo.uid || 0}}</text>
|
<text>ID:{{ userInfo.uid || 0}}</text>
|
||||||
<text class="iconfont icon-bianji1"></text>
|
<text class="iconfont icon-bianji1"></text>
|
||||||
</view>
|
</view>
|
||||||
<button open-type="getPhoneNumber" @getphonenumber="getPhoneNumber" class="binding" v-else>
|
<button
|
||||||
|
open-type="getPhoneNumber"
|
||||||
|
@getphonenumber="getPhoneNumber"
|
||||||
|
class="binding"
|
||||||
|
v-else
|
||||||
|
>
|
||||||
<text>绑定手机号</text>
|
<text>绑定手机号</text>
|
||||||
</button>
|
</button>
|
||||||
</view>
|
</view>
|
||||||
@@ -31,7 +36,11 @@
|
|||||||
<text>我的余额</text>
|
<text>我的余额</text>
|
||||||
<text class="num">{{ userInfo.nowMoney || 0 }}</text>
|
<text class="num">{{ userInfo.nowMoney || 0 }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view @click="goUserPromotion()" class="item" v-if="userInfo.isPromoter === 1 || userInfo.statu === 2">
|
<view
|
||||||
|
@click="goUserPromotion()"
|
||||||
|
class="item"
|
||||||
|
v-if="userInfo.isPromoter === 1 || userInfo.statu === 2"
|
||||||
|
>
|
||||||
<text>当前佣金</text>
|
<text>当前佣金</text>
|
||||||
<text class="num">{{ userInfo.brokeragePrice || 0 }}</text>
|
<text class="num">{{ userInfo.brokeragePrice || 0 }}</text>
|
||||||
</view>
|
</view>
|
||||||
@@ -56,35 +65,50 @@
|
|||||||
<view @click="goMyOrder(0)" class="item">
|
<view @click="goMyOrder(0)" class="item">
|
||||||
<view class="pictrue">
|
<view class="pictrue">
|
||||||
<image src="@/static/images/dfk.png" />
|
<image src="@/static/images/dfk.png" />
|
||||||
<text class="order-status-num" v-if="userInfo.orderStatusNum.unpaidCount > 0">{{ userInfo.orderStatusNum.unpaidCount }}</text>
|
<text
|
||||||
|
class="order-status-num"
|
||||||
|
v-if="userInfo.orderStatusNum.unpaidCount > 0"
|
||||||
|
>{{ userInfo.orderStatusNum.unpaidCount }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view>待付款</view>
|
<view>待付款</view>
|
||||||
</view>
|
</view>
|
||||||
<view @click="goMyOrder(1)" class="item">
|
<view @click="goMyOrder(1)" class="item">
|
||||||
<view class="pictrue">
|
<view class="pictrue">
|
||||||
<image src="@/static/images/dfh.png" />
|
<image src="@/static/images/dfh.png" />
|
||||||
<text class="order-status-num" v-if="userInfo.orderStatusNum.unshippedCount > 0">{{ userInfo.orderStatusNum.unshippedCount }}</text>
|
<text
|
||||||
|
class="order-status-num"
|
||||||
|
v-if="userInfo.orderStatusNum.unshippedCount > 0"
|
||||||
|
>{{ userInfo.orderStatusNum.unshippedCount }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view>待发货</view>
|
<view>待发货</view>
|
||||||
</view>
|
</view>
|
||||||
<view @click="goMyOrder(2)" class="item">
|
<view @click="goMyOrder(2)" class="item">
|
||||||
<view class="pictrue">
|
<view class="pictrue">
|
||||||
<image src="@/static/images/dsh.png" />
|
<image src="@/static/images/dsh.png" />
|
||||||
<text class="order-status-num" v-if="userInfo.orderStatusNum.receivedCount > 0">{{ userInfo.orderStatusNum.receivedCount }}</text>
|
<text
|
||||||
|
class="order-status-num"
|
||||||
|
v-if="userInfo.orderStatusNum.receivedCount > 0"
|
||||||
|
>{{ userInfo.orderStatusNum.receivedCount }}</text>
|
||||||
</view>
|
</view>
|
||||||
<text>待收货</text>
|
<text>待收货</text>
|
||||||
</view>
|
</view>
|
||||||
<view @click="goMyOrder(3)" class="item">
|
<view @click="goMyOrder(3)" class="item">
|
||||||
<view class="pictrue">
|
<view class="pictrue">
|
||||||
<image src="@/static/images/dpj.png" />
|
<image src="@/static/images/dpj.png" />
|
||||||
<text class="order-status-num" v-if="userInfo.orderStatusNum.evaluatedCount > 0">{{ userInfo.orderStatusNum.evaluatedCount }}</text>
|
<text
|
||||||
|
class="order-status-num"
|
||||||
|
v-if="userInfo.orderStatusNum.evaluatedCount > 0"
|
||||||
|
>{{ userInfo.orderStatusNum.evaluatedCount }}</text>
|
||||||
</view>
|
</view>
|
||||||
<text>待评价</text>
|
<text>待评价</text>
|
||||||
</view>
|
</view>
|
||||||
<view @click="goReturnList()" class="item">
|
<view @click="goReturnList()" class="item">
|
||||||
<view class="pictrue">
|
<view class="pictrue">
|
||||||
<image src="@/static/images/sh.png" />
|
<image src="@/static/images/sh.png" />
|
||||||
<text class="order-status-num" v-if="userInfo.orderStatusNum.refundCount > 0">{{ userInfo.orderStatusNum.refundCount }}</text>
|
<text
|
||||||
|
class="order-status-num"
|
||||||
|
v-if="userInfo.orderStatusNum.refundCount > 0"
|
||||||
|
>{{ userInfo.orderStatusNum.refundCount }}</text>
|
||||||
</view>
|
</view>
|
||||||
<text>售后/退款</text>
|
<text>售后/退款</text>
|
||||||
</view>
|
</view>
|
||||||
@@ -96,7 +120,12 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="serviceList acea-row row-middle">
|
<view class="serviceList acea-row row-middle">
|
||||||
<template v-for="(item, MyMenusIndex) in MyMenus">
|
<template v-for="(item, MyMenusIndex) in MyMenus">
|
||||||
<view class="item" :key="MyMenusIndex" @click="goPages(MyMenusIndex)" v-if="item.url">
|
<view
|
||||||
|
class="item"
|
||||||
|
:key="MyMenusIndex"
|
||||||
|
@click="goPages(MyMenusIndex)"
|
||||||
|
v-if="item.url&&item.id!='230'"
|
||||||
|
>
|
||||||
<view class="pictrue">
|
<view class="pictrue">
|
||||||
<image :src="item.pic" />
|
<image :src="item.pic" />
|
||||||
</view>
|
</view>
|
||||||
@@ -132,30 +161,21 @@
|
|||||||
v-on:changeswitch="changeswitch"
|
v-on:changeswitch="changeswitch"
|
||||||
:switchActive="switchActive"
|
:switchActive="switchActive"
|
||||||
:login_type="userInfo.login_type"
|
:login_type="userInfo.login_type"
|
||||||
></SwitchWindow> -->
|
></SwitchWindow>-->
|
||||||
</view>
|
</view>
|
||||||
<Authorization v-if="!$store.getters.token" />
|
<Authorization v-if="!$store.getters.token" />
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import {
|
import { getUser, getMenuUser, bindingPhone } from "@/api/user";
|
||||||
getUser,
|
import { isWeixin, VUE_APP_RESOURCES_URL } from "@/utils";
|
||||||
getMenuUser,
|
import SwitchWindow from "@/components/SwitchWindow";
|
||||||
bindingPhone
|
import Authorization from "@/pages/authorization/index";
|
||||||
} from "@/api/user";
|
import { mapGetters } from "vuex";
|
||||||
import {
|
|
||||||
isWeixin,
|
|
||||||
VUE_APP_RESOURCES_URL
|
|
||||||
} from "@/utils";
|
|
||||||
import SwitchWindow from "@/components/SwitchWindow";
|
|
||||||
import Authorization from "@/pages/authorization/index";
|
|
||||||
import {
|
|
||||||
mapGetters
|
|
||||||
} from "vuex";
|
|
||||||
|
|
||||||
const NAME = "User";
|
const NAME = "User";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: NAME,
|
name: NAME,
|
||||||
components: {
|
components: {
|
||||||
SwitchWindow,
|
SwitchWindow,
|
||||||
@@ -304,7 +324,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
console.log(this.$store.getters.token)
|
console.log(this.$store.getters.token);
|
||||||
console.log(this.userInfo);
|
console.log(this.userInfo);
|
||||||
if (this.$store.getters.token) {
|
if (this.$store.getters.token) {
|
||||||
this.User();
|
this.User();
|
||||||
@@ -312,53 +332,53 @@
|
|||||||
this.isWeixin = isWeixin();
|
this.isWeixin = isWeixin();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less">
|
<style lang="less">
|
||||||
.footer-line-height {
|
.footer-line-height {
|
||||||
height: 1*100rpx;
|
height: 1 * 100rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.order-status-num {
|
.order-status-num {
|
||||||
min-width: 0.33*100rpx;
|
min-width: 0.33 * 100rpx;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
color: #00c17b;
|
color: #00c17b;
|
||||||
border-radius: 15px;
|
border-radius: 15px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: -0.14*100rpx;
|
right: -0.14 * 100rpx;
|
||||||
top: -0.15*100rpx;
|
top: -0.15 * 100rpx;
|
||||||
font-size: 0.2*100rpx;
|
font-size: 0.2 * 100rpx;
|
||||||
padding: 0 0.08*100rpx;
|
padding: 0 0.08 * 100rpx;
|
||||||
border: 1px solid #00c17b;
|
border: 1px solid #00c17b;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pictrue {
|
.pictrue {
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.switch-h5 {
|
.switch-h5 {
|
||||||
margin-left: 0.2*100rpx;
|
margin-left: 0.2 * 100rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.binding {
|
.binding {
|
||||||
margin-top: 0.1*100rpx;
|
margin-top: 0.1 * 100rpx;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
padding: 0.05*100rpx 0.2*100rpx;
|
padding: 0.05 * 100rpx 0.2 * 100rpx;
|
||||||
background-color: #ca1f10;
|
background-color: #ca1f10;
|
||||||
border-radius: 50px;
|
border-radius: 50px;
|
||||||
font-size: 0.22*100rpx;
|
font-size: 0.22 * 100rpx;
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
border: 1px solid #e8695e;
|
border: 1px solid #e8695e;
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.by{
|
.by {
|
||||||
text-align:center;
|
text-align: center;
|
||||||
margin-top: 30rpx
|
margin-top: 30rpx;
|
||||||
}
|
}
|
||||||
.by-text{
|
.by-text {
|
||||||
text-align:center;
|
text-align: center;
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -62,8 +62,8 @@ export default {
|
|||||||
this.getActivity();
|
this.getActivity();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
goUserBill(id) {
|
goUserBill(types) {
|
||||||
this.$yrouter.push({ path: "/pages/user/UserBill/index", query: { id } });
|
this.$yrouter.push({ path: "/pages/user/UserBill/index", query: { types } });
|
||||||
},
|
},
|
||||||
getIndex: function() {
|
getIndex: function() {
|
||||||
let that = this;
|
let that = this;
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
<view class="item acea-row row-between-wrapper">
|
<view class="item acea-row row-between-wrapper">
|
||||||
<view class="name">所在地区</view>
|
<view class="name">所在地区</view>
|
||||||
<view class="picker acea-row row-between-wrapper select-value form-control">
|
<view class="picker acea-row row-between-wrapper select-value form-control">
|
||||||
<view class="address">
|
<view class="address" @tap="openAddres">
|
||||||
<!-- <picker
|
<!-- <picker
|
||||||
@columnchange="addRessColumnchange"
|
@columnchange="addRessColumnchange"
|
||||||
@change="changeAddress"
|
@change="changeAddress"
|
||||||
@@ -23,7 +23,7 @@
|
|||||||
<text class="uni-input" v-if="model2">{{model2}}</text>
|
<text class="uni-input" v-if="model2">{{model2}}</text>
|
||||||
<text class="uni-input" v-else>请选择地区</text>
|
<text class="uni-input" v-else>请选择地区</text>
|
||||||
</picker>-->
|
</picker>-->
|
||||||
<text class="uni-input" @tap="openAddres2" >{{model2||'请选择'}}</text>
|
<text class="uni-input">{{model2||'请选择'}}</text>
|
||||||
<simple-address
|
<simple-address
|
||||||
ref="simpleAddress"
|
ref="simpleAddress"
|
||||||
:pickerValueDefault="cityPickerValueDefault"
|
:pickerValueDefault="cityPickerValueDefault"
|
||||||
@@ -102,37 +102,37 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
openAddres() {
|
openAddres() {
|
||||||
this.cityPickerValueDefault = [0, 0, 1];
|
|
||||||
this.$refs.simpleAddress.open();
|
|
||||||
},
|
|
||||||
openAddres2() {
|
|
||||||
// 根据 label 获取
|
// 根据 label 获取
|
||||||
|
if (this.address.province) {
|
||||||
|
// 这个插件有个问题,直辖市的 city 必须得是 市辖区
|
||||||
if(this.address.province){
|
try {
|
||||||
|
let str = "市";
|
||||||
|
let city = this.address.city;
|
||||||
|
if (this.address.province.indexOf(str) != -1) {
|
||||||
|
city = "市辖区";
|
||||||
|
}
|
||||||
var index = this.$refs.simpleAddress.queryIndex(
|
var index = this.$refs.simpleAddress.queryIndex(
|
||||||
[this.address.province, this.address.city, this.address.district],
|
[this.address.province, city, this.address.district],
|
||||||
"label"
|
"label"
|
||||||
);
|
);
|
||||||
console.log(index);
|
|
||||||
this.cityPickerValueDefault = index.index;
|
this.cityPickerValueDefault = index.index;
|
||||||
|
} catch (error) {}
|
||||||
}
|
}
|
||||||
this.$refs.simpleAddress.open();
|
this.$refs.simpleAddress.open();
|
||||||
},
|
|
||||||
openAddres3() {
|
// var index = this.$refs.simpleAddress.queryIndex(
|
||||||
// 根据value 获取
|
// [13, 1302, 130203],
|
||||||
var index = this.$refs.simpleAddress.queryIndex(
|
// "value"
|
||||||
[13, 1302, 130203],
|
// );
|
||||||
"value"
|
// this.cityPickerValueDefault = index.index;
|
||||||
);
|
// this.$refs.simpleAddress.open();
|
||||||
console.log(index);
|
|
||||||
this.cityPickerValueDefault = index.index;
|
|
||||||
this.$refs.simpleAddress.open();
|
|
||||||
},
|
},
|
||||||
onConfirm(e) {
|
onConfirm(e) {
|
||||||
this.pickerText = JSON.stringify(e);
|
this.pickerText = JSON.stringify(e);
|
||||||
this.model2 = e.label;
|
this.model2 = e.label;
|
||||||
|
this.address.province = e.labelArr[0] || "";
|
||||||
|
this.address.city = e.labelArr[1] || "";
|
||||||
|
this.address.district = e.labelArr[2] || "";
|
||||||
console.log(this.pickerText);
|
console.log(this.pickerText);
|
||||||
},
|
},
|
||||||
getUserAddress: function() {
|
getUserAddress: function() {
|
||||||
@@ -226,3 +226,12 @@ if(this.address.province){
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<style lang="less">
|
||||||
|
.address {
|
||||||
|
text {
|
||||||
|
width: 100%;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
@@ -4,7 +4,12 @@
|
|||||||
<swiper indicatorDots="true">
|
<swiper indicatorDots="true">
|
||||||
<block v-for="(item, infoIndex) in info" :key="infoIndex">
|
<block v-for="(item, infoIndex) in info" :key="infoIndex">
|
||||||
<swiper-item>
|
<swiper-item>
|
||||||
<image class="slide-image" :src="item.wap_poster" mode="widthFix" show-menu-by-longpress />
|
<image
|
||||||
|
class="slide-image"
|
||||||
|
:src="item.wap_poster"
|
||||||
|
mode="widthFix"
|
||||||
|
show-menu-by-longpress
|
||||||
|
/>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</block>
|
</block>
|
||||||
</swiper>
|
</swiper>
|
||||||
@@ -13,12 +18,10 @@
|
|||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
// import { swiper, swiperSlide } from "vue-awesome-swiper";
|
// import { swiper, swiperSlide } from "vue-awesome-swiper";
|
||||||
import {
|
import { getSpreadImg } from "@/api/user";
|
||||||
getSpreadImg
|
|
||||||
} from "@/api/user";
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Poster",
|
name: "Poster",
|
||||||
components: {
|
components: {
|
||||||
// swiper,
|
// swiper,
|
||||||
@@ -61,9 +64,9 @@
|
|||||||
methods: {
|
methods: {
|
||||||
getIndex: function() {
|
getIndex: function() {
|
||||||
let that = this;
|
let that = this;
|
||||||
let form = {}
|
let form = {};
|
||||||
if (this.$deviceType == 'app') {
|
if (this.$deviceType == "app") {
|
||||||
form.form = 'app'
|
form.form = "app";
|
||||||
}
|
}
|
||||||
getSpreadImg(form).then(
|
getSpreadImg(form).then(
|
||||||
res => {
|
res => {
|
||||||
@@ -72,7 +75,7 @@
|
|||||||
err => {
|
err => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: err.msg || err.response.data.msg,
|
title: err.msg || err.response.data.msg,
|
||||||
icon: 'none',
|
icon: "none",
|
||||||
duration: 2000
|
duration: 2000
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -86,7 +89,8 @@
|
|||||||
if (!wx.saveImageToPhotosAlbum) {
|
if (!wx.saveImageToPhotosAlbum) {
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: "提示",
|
title: "提示",
|
||||||
content: "当前微信版本过低,无法使用该功能,请升级到最新微信版本后重试。"
|
content:
|
||||||
|
"当前微信版本过低,无法使用该功能,请升级到最新微信版本后重试。"
|
||||||
});
|
});
|
||||||
that.openDialogVisible = true;
|
that.openDialogVisible = true;
|
||||||
|
|
||||||
@@ -130,24 +134,27 @@
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="less">
|
<style lang="less">
|
||||||
.distribution-posters {
|
page {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
.distribution-posters {
|
||||||
.banenr {
|
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.banner swiper {
|
.banenr {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.banner .slide-image {
|
.banner swiper {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.banner .slide-image {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: auto;
|
height: auto;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
+8
-7
@@ -4,7 +4,7 @@ import Vuex from "vuex";
|
|||||||
Vue.use(Vuex);
|
Vue.use(Vuex);
|
||||||
const debug = process.env.NODE_ENV !== "production";
|
const debug = process.env.NODE_ENV !== "production";
|
||||||
|
|
||||||
import store from "@/utils/store/cookie";
|
import cookie from "@/utils/store/cookie";
|
||||||
import {
|
import {
|
||||||
getUserInfo
|
getUserInfo
|
||||||
} from "@/api/user";
|
} from "@/api/user";
|
||||||
@@ -18,8 +18,9 @@ const vuexStore = new Vuex.Store({
|
|||||||
isAuthorizationPage: false,
|
isAuthorizationPage: false,
|
||||||
// 是否授权
|
// 是否授权
|
||||||
isAuthorization: false,
|
isAuthorization: false,
|
||||||
token: store.get(LOGIN_KEY) || null,
|
// 不建议从这里取 token,但是删除掉会影响其他的页面
|
||||||
userInfo: store.get('userInfo'),
|
token: cookie.get(LOGIN_KEY) || null,
|
||||||
|
userInfo: cookie.get('userInfo'),
|
||||||
$deviceType: null,
|
$deviceType: null,
|
||||||
},
|
},
|
||||||
mutations: {
|
mutations: {
|
||||||
@@ -46,12 +47,12 @@ const vuexStore = new Vuex.Store({
|
|||||||
},
|
},
|
||||||
LOGIN(state, token, expires_time) {
|
LOGIN(state, token, expires_time) {
|
||||||
state.token = token;
|
state.token = token;
|
||||||
store.set(LOGIN_KEY, token, expires_time);
|
cookie.set(LOGIN_KEY, token, expires_time);
|
||||||
},
|
},
|
||||||
LOGOUT(state) {
|
LOGOUT(state) {
|
||||||
state.token = null;
|
state.token = null;
|
||||||
state.userInfo = null
|
state.userInfo = null
|
||||||
store.clearAll()
|
cookie.clearAll()
|
||||||
},
|
},
|
||||||
BACKGROUND_COLOR(state, color) {
|
BACKGROUND_COLOR(state, color) {
|
||||||
state.color = color;
|
state.color = color;
|
||||||
@@ -99,9 +100,9 @@ const vuexStore = new Vuex.Store({
|
|||||||
}, user) {
|
}, user) {
|
||||||
commit("UPDATE_USERINFO", user);
|
commit("UPDATE_USERINFO", user);
|
||||||
if (user) {
|
if (user) {
|
||||||
store.set('userInfo', user)
|
cookie.set('userInfo', user)
|
||||||
} else {
|
} else {
|
||||||
store.set('userInfo', null)
|
cookie.set('userInfo', null)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
changeAuthorizationPage({
|
changeAuthorizationPage({
|
||||||
|
|||||||
+38
-8
@@ -122,6 +122,8 @@ export const replaceLogin = (msg) => {
|
|||||||
console.log(uni, 989)
|
console.log(uni, 989)
|
||||||
if (Vue.prototype.$deviceType == 'weixin') {
|
if (Vue.prototype.$deviceType == 'weixin') {
|
||||||
// 如果是微信小程序,跳转到授权页
|
// 如果是微信小程序,跳转到授权页
|
||||||
|
login({
|
||||||
|
fail: () => {
|
||||||
replace({
|
replace({
|
||||||
path: '/pages/authorization/index',
|
path: '/pages/authorization/index',
|
||||||
query: {
|
query: {
|
||||||
@@ -129,6 +131,9 @@ export const replaceLogin = (msg) => {
|
|||||||
...parseQuery()
|
...parseQuery()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// 如果不是小程序跳转到登录页
|
// 如果不是小程序跳转到登录页
|
||||||
push({
|
push({
|
||||||
@@ -218,7 +223,7 @@ export const login = (option) => {
|
|||||||
console.log('登录成功4')
|
console.log('登录成功4')
|
||||||
store.commit("LOGIN", data.token, dayjs(data.expires_time));
|
store.commit("LOGIN", data.token, dayjs(data.expires_time));
|
||||||
console.log('登录成功5')
|
console.log('登录成功5')
|
||||||
|
console.log(store)
|
||||||
handleGetUserInfo()
|
handleGetUserInfo()
|
||||||
|
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
@@ -259,6 +264,7 @@ export const login = (option) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const handleGetUserInfo = () => {
|
export const handleGetUserInfo = () => {
|
||||||
|
console.log('登录后请求用户信息')
|
||||||
getUser().then(res => {
|
getUser().then(res => {
|
||||||
console.log(res.data, '登录后的样式')
|
console.log(res.data, '登录后的样式')
|
||||||
store.dispatch('setUserInfo', res.data)
|
store.dispatch('setUserInfo', res.data)
|
||||||
@@ -296,10 +302,17 @@ export const handleGetUserInfo = () => {
|
|||||||
path: url,
|
path: url,
|
||||||
query
|
query
|
||||||
})
|
})
|
||||||
|
if (url == '/pages/home/index' || url == '/pages/shop/GoodsClass/index' || url == '/pages/shop/ShoppingCart/index' || url == '/pages/user/User/index') {
|
||||||
switchTab({
|
switchTab({
|
||||||
path: `${url}`,
|
path: `${url}`,
|
||||||
query
|
query
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
push({
|
||||||
|
path: `${url}`,
|
||||||
|
query
|
||||||
|
})
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -341,9 +354,25 @@ export function parseRoute($mp) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function auth() {
|
||||||
|
/**
|
||||||
|
* 如何判断权限?
|
||||||
|
* 用户如果登录了系统,会留下两个东西,一个是token,一个是userInfo
|
||||||
|
* token存在会过期的问题,如果长时间没有打开小程序,会导致登录失效,出现打开一个页面瞬间跳转到授权页面的问题
|
||||||
|
* 解决办法,保存token的时候加上过期时间,每次请求都取一下缓存里的token
|
||||||
|
* userInfo只是用来限时用户信息,作用并不是很大
|
||||||
|
* ps:只需要判断 token 是否存在即可
|
||||||
|
*/
|
||||||
|
console.log(cookie.get('login_status'), 'token')
|
||||||
|
if (cookie.get('login_status')) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
export const handleLoginStatus = (location, complete, fail, success) => {
|
export const handleLoginStatus = (location, complete, fail, success) => {
|
||||||
console.log(location, '开始健全')
|
console.log(location, '开始检验权限')
|
||||||
// 不登录可访问的页面
|
// 不登录可访问的页面
|
||||||
let page = [{
|
let page = [{
|
||||||
path: '/pages/Loading/index',
|
path: '/pages/Loading/index',
|
||||||
@@ -374,8 +403,7 @@ export const handleLoginStatus = (location, complete, fail, success) => {
|
|||||||
path = location.path
|
path = location.path
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(store.getters.userInfo, '用户信息')
|
if (!auth()) {
|
||||||
if (!store.getters.token) {
|
|
||||||
page.map((item) => {
|
page.map((item) => {
|
||||||
console.log(item.path == path)
|
console.log(item.path == path)
|
||||||
if (item.path == path) {
|
if (item.path == path) {
|
||||||
@@ -534,15 +562,16 @@ export const PosterCanvas = (store, successCallBack) => {
|
|||||||
mask: true
|
mask: true
|
||||||
});
|
});
|
||||||
getImageInfo([store.image, store.code]).then(res => {
|
getImageInfo([store.image, store.code]).then(res => {
|
||||||
|
console.log(res)
|
||||||
let contentHh = 48 * 1.3
|
let contentHh = 48 * 1.3
|
||||||
const ctx = uni.createCanvasContext('myCanvas');
|
const ctx = uni.createCanvasContext('myCanvas')
|
||||||
ctx.clearRect(0, 0, 0, 0);
|
ctx.clearRect(0, 0, 0, 0);
|
||||||
const WIDTH = 747
|
const WIDTH = 747
|
||||||
const HEIGHT = 1326;
|
const HEIGHT = 1326;
|
||||||
ctx.fillStyle = "#FFFFFF";
|
ctx.fillStyle = "#FFFFFF";
|
||||||
ctx.fillRect(0, 0, WIDTH, HEIGHT);
|
ctx.fillRect(0, 0, WIDTH, HEIGHT);
|
||||||
ctx.drawImage(res[1].path, 40, 1064, 200, 200);
|
|
||||||
ctx.drawImage(res[0].path, 0, 0, WIDTH, WIDTH);
|
ctx.drawImage(res[0].path, 0, 0, WIDTH, WIDTH);
|
||||||
|
ctx.drawImage(res[1].path, 40, 1064, 200, 200);
|
||||||
ctx.save();
|
ctx.save();
|
||||||
let r = 90;
|
let r = 90;
|
||||||
let d = r * 2;
|
let d = r * 2;
|
||||||
@@ -562,10 +591,10 @@ export const PosterCanvas = (store, successCallBack) => {
|
|||||||
ctx.setTextAlign('center')
|
ctx.setTextAlign('center')
|
||||||
ctx.setFontSize(22);
|
ctx.setFontSize(22);
|
||||||
ctx.setFillStyle('#333333');
|
ctx.setFillStyle('#333333');
|
||||||
|
console.log('长按识别二维码立即购买')
|
||||||
ctx.fillText('长按识别二维码立即购买', WIDTH / 2, 1167);
|
ctx.fillText('长按识别二维码立即购买', WIDTH / 2, 1167);
|
||||||
// ctx.drawImage(store.code, 199, 1064, 200, 200);
|
|
||||||
ctx.save();
|
ctx.save();
|
||||||
ctx.draw(true, function (oi) {
|
ctx.draw(true, () => {
|
||||||
uni.canvasToTempFilePath({
|
uni.canvasToTempFilePath({
|
||||||
canvasId: 'myCanvas',
|
canvasId: 'myCanvas',
|
||||||
fileType: 'png',
|
fileType: 'png',
|
||||||
@@ -581,6 +610,7 @@ export const PosterCanvas = (store, successCallBack) => {
|
|||||||
|
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
// uni.getImageInfo({
|
// uni.getImageInfo({
|
||||||
|
|||||||
+19
-8
@@ -2,6 +2,7 @@ import Fly from "flyio/dist/npm/wx";
|
|||||||
import $store from "../store";
|
import $store from "../store";
|
||||||
import toLogin from "@/libs/login";
|
import toLogin from "@/libs/login";
|
||||||
import { VUE_APP_API_URL } from "@/config";
|
import { VUE_APP_API_URL } from "@/config";
|
||||||
|
import cookie from "@/utils/store/cookie";
|
||||||
|
|
||||||
|
|
||||||
const fly = new Fly()
|
const fly = new Fly()
|
||||||
@@ -28,28 +29,38 @@ fly.interceptors.response.use(
|
|||||||
const defaultOpt = { login: true };
|
const defaultOpt = { login: true };
|
||||||
|
|
||||||
function baseRequest(options) {
|
function baseRequest(options) {
|
||||||
const token = $store.state.token;
|
|
||||||
const headers = options.headers || {};
|
// 从缓存中获取 token 防止 token 失效后还会继续请求的情况
|
||||||
if (options.login) {
|
const token = cookie.get('login_status');
|
||||||
headers["Authorization"] = "Bearer " + token;
|
|
||||||
|
// 合并传参过来的 headers
|
||||||
|
// 如果接口需要登录,携带 token 去请求
|
||||||
|
options.headers = {
|
||||||
|
...options.headers,
|
||||||
|
Authorization: "Bearer " + token
|
||||||
}
|
}
|
||||||
|
|
||||||
options.headers = headers;
|
// 如果需要登录才可访问的接口没有拿到 token 视为登录失效
|
||||||
if (options.login && !token) {
|
if (options.login === true && !token) {
|
||||||
|
// 跳转到登录或授权页面
|
||||||
toLogin();
|
toLogin();
|
||||||
|
// 提示错误信息
|
||||||
return Promise.reject({ msg: "未登录", toLogin: true });
|
return Promise.reject({ msg: "未登录", toLogin: true });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 结构请求需要的参数
|
||||||
const { url, params, data, login, ...option } = options
|
const { url, params, data, login, ...option } = options
|
||||||
|
|
||||||
|
// 发起请求
|
||||||
return fly.request(url, params || data, {
|
return fly.request(url, params || data, {
|
||||||
...option
|
...option
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
console.log(res)
|
console.log(res)
|
||||||
// console.log(url,params,data, ...option)
|
// console.log(url,params,data, ...option)
|
||||||
const data = res.data || {};
|
const data = res.data || {};
|
||||||
if (res.status !== 200)
|
if (res.status !== 200) {
|
||||||
return Promise.reject({ msg: "请求失败", res, data });
|
return Promise.reject({ msg: "请求失败", res, data });
|
||||||
|
}
|
||||||
if ([410000, 410001, 410002].indexOf(data.status) !== -1) {
|
if ([410000, 410001, 410002].indexOf(data.status) !== -1) {
|
||||||
toLogin();
|
toLogin();
|
||||||
return Promise.reject({ msg: res.data.msg, res, data, toLogin: true });
|
return Promise.reject({ msg: res.data.msg, res, data, toLogin: true });
|
||||||
|
|||||||
Reference in New Issue
Block a user