Compare commits
2 Commits
0e7139bc16
...
cmx
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5e0162e3ea | ||
|
|
282502a8d6 |
@@ -202,10 +202,9 @@ export default {
|
|||||||
return vm.$u.post('Spike/recommendedSpike');
|
return vm.$u.post('Spike/recommendedSpike');
|
||||||
},
|
},
|
||||||
// 秒杀详情
|
// 秒杀详情
|
||||||
getSpikeInfo({ groupbuy_id, goods_id }) {
|
getSpikeInfo({ groupbuy_id }) {
|
||||||
return vm.$u.post('Spike/spikeInfo', {
|
return vm.$u.post('Spike/spikeInfo', {
|
||||||
groupbuy_id: groupbuy_id,
|
groupbuy_id: groupbuy_id
|
||||||
goods_id: goods_id,
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 秒杀列表
|
// 秒杀列表
|
||||||
@@ -222,11 +221,8 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 拼团商品详情
|
// 拼团商品详情
|
||||||
getPinTuanDetails({ pintuan_id, goods_id }) {
|
getPinTuanDetails({ pintuan_id }) {
|
||||||
return vm.$u.post('Specialci/pintuanInfo', {
|
return vm.$u.post('Specialci/pintuanInfo', { pintuan_id: pintuan_id });
|
||||||
pintuan_id: pintuan_id,
|
|
||||||
goods_id: goods_id,
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
// 推荐拼团
|
// 推荐拼团
|
||||||
getPinTuanPush() {
|
getPinTuanPush() {
|
||||||
|
|||||||
@@ -304,8 +304,8 @@ export default {
|
|||||||
return vm.$u.post('Message/informationList', { });
|
return vm.$u.post('Message/informationList', { });
|
||||||
},
|
},
|
||||||
// 关注列表
|
// 关注列表
|
||||||
snsfriendList({page}) {
|
snsfriendList({ }) {
|
||||||
return vm.$u.post('message/snsfriendList', {page});
|
return vm.$u.post('message/snsfriendList', { });
|
||||||
},
|
},
|
||||||
// 关注达人
|
// 关注达人
|
||||||
attentionMember({ member_id }) {
|
attentionMember({ member_id }) {
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ export default {
|
|||||||
props:['item','title'],
|
props:['item','title'],
|
||||||
watch:{
|
watch:{
|
||||||
select(){
|
select(){
|
||||||
// console.log(this.select)
|
console.log(this.select)
|
||||||
this.$emit("sel", this.select);
|
this.$emit("sel", this.select);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -56,8 +56,17 @@ export default {
|
|||||||
},
|
},
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
this.price = option.price;
|
this.price = option.price;
|
||||||
|
// this.isNewmembervoucher();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 是否显示新人优惠券
|
||||||
|
isNewmembervoucher() {
|
||||||
|
this.$u.api.isNewmembervoucher().then(res => {
|
||||||
|
if(res.errCode == 0) {
|
||||||
|
this.price = res.data.price;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
exchangeCoupon() {
|
exchangeCoupon() {
|
||||||
this.$u.api.getCoupon({ id: 1 }).then(res => {
|
this.$u.api.getCoupon({ id: 1 }).then(res => {
|
||||||
this.$u.toast(res.message);
|
this.$u.toast(res.message);
|
||||||
|
|||||||
@@ -1,88 +0,0 @@
|
|||||||
<template>
|
|
||||||
<u-popup v-model="showCoupon" mode="center" class="u-coupon-popup">
|
|
||||||
<view class="coupon">
|
|
||||||
<view class="price">{{ newMemberCoupon.price }}</view>
|
|
||||||
<image src="/static/image/common/30.png" class="coupon-image" @click="viewCoupon"></image>
|
|
||||||
<image src="/static/image/common/24.png" class="close-image" @click="showCoupon=false"></image>
|
|
||||||
</view>
|
|
||||||
</u-popup>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
showCoupon: true,
|
|
||||||
newMemberCoupon: {},
|
|
||||||
}
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
showCoupon(value) {
|
|
||||||
if(!value) {
|
|
||||||
uni.navigateBack();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
onShow() {
|
|
||||||
this.isNewmembervoucher();
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
viewCoupon() {
|
|
||||||
this.$u.route('/pageB/coupon/details', {
|
|
||||||
price: this.newMemberCoupon.price
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 是否显示新人优惠券
|
|
||||||
isNewmembervoucher() {
|
|
||||||
this.$u.api.isNewmembervoucher().then(res => {
|
|
||||||
if(res.errCode == 0) {
|
|
||||||
this.newMemberCoupon = res.data;
|
|
||||||
} else {
|
|
||||||
this.showCoupon = false;
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss">
|
|
||||||
page{
|
|
||||||
background-color: rgba(0,0,0,0);
|
|
||||||
}
|
|
||||||
.u-coupon-popup {
|
|
||||||
/deep/ .u-mode-center-box {
|
|
||||||
background-color: transparent;
|
|
||||||
}
|
|
||||||
.coupon {
|
|
||||||
width: 750rpx;
|
|
||||||
height: 583rpx;
|
|
||||||
position: relative;
|
|
||||||
.price {
|
|
||||||
z-index: 3;
|
|
||||||
color: #EBB36E;
|
|
||||||
position: absolute;
|
|
||||||
font-size: 98rpx;
|
|
||||||
font-weight: bold;
|
|
||||||
top: 200rpx;
|
|
||||||
left: 50%;
|
|
||||||
transform: translate(-68%, 0);
|
|
||||||
}
|
|
||||||
.coupon-image {
|
|
||||||
width: 568rpx;
|
|
||||||
height: 583rpx;
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
left: 50%;
|
|
||||||
transform: translate(-60%, 0);
|
|
||||||
}
|
|
||||||
.close-image {
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
right: 155rpx;
|
|
||||||
width: 60rpx;
|
|
||||||
height: 60rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -76,7 +76,7 @@ export default {
|
|||||||
},
|
},
|
||||||
searchValue() {
|
searchValue() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pageB/search/index?type=2&curent=1'
|
url: '/pageB/search/index?type=2'
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -196,7 +196,7 @@ export default {
|
|||||||
goodsInfo: {}, // 商品信息
|
goodsInfo: {}, // 商品信息
|
||||||
storeInfo: {}, // 店铺信息
|
storeInfo: {}, // 店铺信息
|
||||||
glist: [], // 规格列表
|
glist: [], // 规格列表
|
||||||
id: 0, // 商品id
|
id: 0, // 商品id/秒杀id/拼团 id
|
||||||
type: '', // 商品类型 商品详情 1普通 2拼团 3秒杀 4优惠券
|
type: '', // 商品类型 商品详情 1普通 2拼团 3秒杀 4优惠券
|
||||||
groupUser: [], // 拼团用户
|
groupUser: [], // 拼团用户
|
||||||
user_suc: [], // 拼团成功用户
|
user_suc: [], // 拼团成功用户
|
||||||
@@ -215,9 +215,7 @@ export default {
|
|||||||
sel: "", // 拼接的规格
|
sel: "", // 拼接的规格
|
||||||
quanxuan: false, // 规格是否选择
|
quanxuan: false, // 规格是否选择
|
||||||
debounce: true, // 防止多次提交订单
|
debounce: true, // 防止多次提交订单
|
||||||
storeid:0, // 店铺 id
|
storeid:0 // 店铺id
|
||||||
pintuan_id: '', // 拼团 id
|
|
||||||
groupbuy_id: '', // 秒杀 id
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
@@ -385,10 +383,10 @@ export default {
|
|||||||
this.ordinaryDetails(id);
|
this.ordinaryDetails(id);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
this.pinTuanDetails();
|
this.pinTuanDetails(id);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
this.spikeGoodsDetails();
|
this.spikeGoodsDetails(id);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
@@ -396,40 +394,38 @@ export default {
|
|||||||
},
|
},
|
||||||
// 普通商品详情
|
// 普通商品详情
|
||||||
ordinaryDetails(id) {
|
ordinaryDetails(id) {
|
||||||
this.$u.api.getGoodsDetails({ id: id }).then(res => {
|
this.$u.api.getGoodsDetails({ id: id }).then((res)=>{
|
||||||
|
// console.log(res)
|
||||||
if (res.errCode == 0) {
|
if (res.errCode == 0) {
|
||||||
this.evaluate = res.data.goods_evaluate_info;
|
this.evaluate = res.data.goods_evaluate_info;
|
||||||
this.goodsInfo = res.data.goods;
|
this.goodsInfo = res.data.goods;
|
||||||
this.storeInfo = res.data.store;
|
this.storeInfo = res.data.store;
|
||||||
this.setSwiperList(res.data.goods_image);
|
this.setSwiperList(res.data.goods_image);
|
||||||
this.glist = res.data.spec_list;
|
this.glist = res.data.spec_list;
|
||||||
this.storeid = res.data.store.store_id;
|
this.storeid = res.data.store.store_id
|
||||||
|
// console.log(this.goodsInfo.mobile_body);
|
||||||
this.type = res.data.view_type;
|
this.type = res.data.view_type;
|
||||||
this.setTitle();
|
this.setTitle();
|
||||||
if(this.type == 1) {
|
if(this.type == 1) {
|
||||||
this.id = res.data.goods.goods_id;
|
this.id = res.data.goods.goods_id;
|
||||||
} else if(this.type == 2) {
|
} else if(this.type == 2) {
|
||||||
this.id = res.data.goods.goods_id;
|
this.id = res.data.goods.pintuan_id;
|
||||||
this.pintuan_id = res.data.goods.pintuan_id;
|
this.getGoodsDetails(this.id);
|
||||||
this.getGoodsDetails();
|
|
||||||
} else if(this.type == 3) {
|
} else if(this.type == 3) {
|
||||||
this.id = res.data.goods.goods_id;
|
this.id = res.data.groupbuy_id;
|
||||||
this.groupbuy_id = res.data.groupbuy_id;
|
this.getGoodsDetails(this.id);
|
||||||
this.getGoodsDetails();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 拼团详情
|
// 拼团详情
|
||||||
pinTuanDetails() {
|
pinTuanDetails(id) {
|
||||||
this.$u.api.getPinTuanDetails({
|
this.$u.api.getPinTuanDetails({
|
||||||
pintuan_id: this.pintuan_id,
|
pintuan_id: id
|
||||||
goods_id: this.id,
|
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if(res.errCode == 0) {
|
if(res.errCode == 0) {
|
||||||
this.evaluate = res.data.data.goods_evaluate_info;
|
this.evaluate = res.data.data.goods_evaluate_info;
|
||||||
this.goodsInfo = res.data.data.goods;
|
this.goodsInfo = res.data.data.goods;
|
||||||
this.pintuan_id = res.data.data.pintuan_id;
|
|
||||||
this.setSwiperList(res.data.data.goods_image);
|
this.setSwiperList(res.data.data.goods_image);
|
||||||
this.glist = res.data.data.spec_list;
|
this.glist = res.data.data.spec_list;
|
||||||
this.user_suc = res.data.data.user_suc;
|
this.user_suc = res.data.data.user_suc;
|
||||||
@@ -439,14 +435,13 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 秒杀详情
|
// 秒杀详情
|
||||||
spikeGoodsDetails() {
|
spikeGoodsDetails(id) {
|
||||||
this.$u.api.getSpikeInfo({
|
this.$u.api.getSpikeInfo({
|
||||||
groupbuy_id: this.groupbuy_id,
|
groupbuy_id: id
|
||||||
goods_id: this.id,
|
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if(res.errCode == 0) {
|
if(res.errCode == 0) {
|
||||||
|
// this.id = res.data.groupbuy_id;
|
||||||
this.groupbuyInfo = res.data.groupbuyInfo;
|
this.groupbuyInfo = res.data.groupbuyInfo;
|
||||||
this.groupbuy_id = res.data.groupbuyInfo.groupbuy_id;
|
|
||||||
this.evaluate = res.data.goodsInfo.goods_evaluate_info;
|
this.evaluate = res.data.goodsInfo.goods_evaluate_info;
|
||||||
this.goodsInfo = res.data.goodsInfo.goods;
|
this.goodsInfo = res.data.goodsInfo.goods;
|
||||||
this.setSwiperList(res.data.goodsInfo.goods_image);
|
this.setSwiperList(res.data.goodsInfo.goods_image);
|
||||||
@@ -502,14 +497,16 @@ export default {
|
|||||||
}
|
}
|
||||||
if(this.type == 2) {
|
if(this.type == 2) {
|
||||||
if(type == 'involvement') {
|
if(type == 'involvement') {
|
||||||
|
// const userId = uni.getStorageSync('user_info').member.member_id;
|
||||||
this.$store.commit('setGroupHeadId', this.involvemenGroupInfo[0].user_id);
|
this.$store.commit('setGroupHeadId', this.involvemenGroupInfo[0].user_id);
|
||||||
|
// console.log(this.$store.state.pintuangroup_headid);
|
||||||
Object.assign(params, {
|
Object.assign(params, {
|
||||||
pintuan_id: this.pintuan_id,
|
pintuan_id: this.id,
|
||||||
pintuangroup_id: this.involvemenGroupInfo[0].pintuangroup_id,
|
pintuangroup_id: this.involvemenGroupInfo[0].pintuangroup_id,
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
Object.assign(params, {
|
Object.assign(params, {
|
||||||
pintuan_id: this.pintuan_id,
|
pintuan_id: this.id,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -522,7 +519,6 @@ export default {
|
|||||||
url: '/pageC/cart/ConfirmOrder'
|
url: '/pageC/cart/ConfirmOrder'
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
this.$u.toast(res.message);
|
|
||||||
this.debounce = true;
|
this.debounce = true;
|
||||||
this.$u.toast(res.message);
|
this.$u.toast(res.message);
|
||||||
}
|
}
|
||||||
@@ -560,9 +556,8 @@ export default {
|
|||||||
// console.log(id)
|
// console.log(id)
|
||||||
// 选择完规格后设商品type = 1
|
// 选择完规格后设商品type = 1
|
||||||
// this.type = 1;
|
// this.type = 1;
|
||||||
// 改变 goods_id
|
this.getGoodsDetails(this.glist[id])
|
||||||
this.id = this.glist[id];
|
this.id = this.glist[id];
|
||||||
this.getGoodsDetails();
|
|
||||||
},
|
},
|
||||||
// 设置页面标题
|
// 设置页面标题
|
||||||
setTitle() {
|
setTitle() {
|
||||||
|
|||||||
@@ -18,13 +18,10 @@ export default {
|
|||||||
searchwordlist: [],
|
searchwordlist: [],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// type: 1 商品 2: 其他
|
// type: 2 商品 1: 其他
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
this.type = option.type;
|
this.type = option.type;
|
||||||
this.curent = option.curent || 0
|
|
||||||
this.getWordList();
|
this.getWordList();
|
||||||
if(option.type == 1) this.setNavSearchInput('搜索您需要的商品');
|
|
||||||
else if(option.type == 2) this.setNavSearchInput('请输入搜索内容');
|
|
||||||
},
|
},
|
||||||
// 点击搜索按钮
|
// 点击搜索按钮
|
||||||
onNavigationBarButtonTap(e) {
|
onNavigationBarButtonTap(e) {
|
||||||
@@ -39,18 +36,6 @@ export default {
|
|||||||
this.search(this.keyword);
|
this.search(this.keyword);
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
setNavSearchInput(placeholder) {
|
|
||||||
// #ifdef APP-PLUS
|
|
||||||
// 修改 placeholder
|
|
||||||
webview.setStyle({
|
|
||||||
'titleNView': {
|
|
||||||
"searchInput": { //修改当前窗口search样式
|
|
||||||
"placeholder": placeholder,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
// #endif
|
|
||||||
},
|
|
||||||
getWordList() {
|
getWordList() {
|
||||||
this.$u.api.searchwordlist({type:this.type}).then(res => {
|
this.$u.api.searchwordlist({type:this.type}).then(res => {
|
||||||
console.log(res)
|
console.log(res)
|
||||||
@@ -66,8 +51,7 @@ export default {
|
|||||||
}
|
}
|
||||||
let params = {
|
let params = {
|
||||||
value: value,
|
value: value,
|
||||||
type: this.type,
|
type: this.type,
|
||||||
curent:this.curent
|
|
||||||
}
|
}
|
||||||
if(this.type == 2) {
|
if(this.type == 2) {
|
||||||
this.$u.route({
|
this.$u.route({
|
||||||
|
|||||||
@@ -78,11 +78,9 @@ export default {
|
|||||||
},
|
},
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
this.value = option.value;
|
this.value = option.value;
|
||||||
this.current = option.curent
|
|
||||||
this.setViewHeight();
|
this.setViewHeight();
|
||||||
this.ShopSearch()
|
this.ShopSearch()
|
||||||
this.setNavSearchInput(this.value);
|
this.setNavSearchInput(this.value);
|
||||||
|
|
||||||
},
|
},
|
||||||
onNavigationBarSearchInputConfirmed(value) {
|
onNavigationBarSearchInputConfirmed(value) {
|
||||||
this.value = value.text
|
this.value = value.text
|
||||||
|
|||||||
@@ -54,8 +54,6 @@ export default {
|
|||||||
this.value = option.value
|
this.value = option.value
|
||||||
this.setViewHeight();
|
this.setViewHeight();
|
||||||
this.ShopSearch()
|
this.ShopSearch()
|
||||||
this.setNavSearchInput(this.value);
|
|
||||||
|
|
||||||
},
|
},
|
||||||
onNavigationBarSearchInputConfirmed(value) {
|
onNavigationBarSearchInputConfirmed(value) {
|
||||||
this.value = value.text
|
this.value = value.text
|
||||||
@@ -97,6 +95,7 @@ export default {
|
|||||||
// 排序方式 goods_salenum:销量 evaluation_count:评价 goods_price_asc:价格从低到高 goods_price_desc:价格从高到低
|
// 排序方式 goods_salenum:销量 evaluation_count:评价 goods_price_asc:价格从低到高 goods_price_desc:价格从高到低
|
||||||
async ShopSearch({ load = 'reload' } = {}) {
|
async ShopSearch({ load = 'reload' } = {}) {
|
||||||
console.log(this.value);
|
console.log(this.value);
|
||||||
|
this.setNavSearchInput(this.value);
|
||||||
const sort = this.setOrderSort();
|
const sort = this.setOrderSort();
|
||||||
const res = await this.$u.api.ShopSearch({
|
const res = await this.$u.api.ShopSearch({
|
||||||
keyword: this.value,
|
keyword: this.value,
|
||||||
|
|||||||
@@ -148,7 +148,7 @@ export default {
|
|||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
this.orderType = this.$store.state.orderType;
|
this.orderType = this.$store.state.orderType;
|
||||||
this.orderInfo = this.$store.state.orderInfo;
|
this.orderInfo = this.$store.state.orderInfo;
|
||||||
// console.log('orderType' + this.orderType);
|
console.log('orderType' + this.orderType);
|
||||||
// console.log(this.orderInfo);
|
// console.log(this.orderInfo);
|
||||||
this.getGoodsClass();
|
this.getGoodsClass();
|
||||||
this.setTotalPrice();
|
this.setTotalPrice();
|
||||||
|
|||||||
@@ -1,18 +1,15 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="attention">
|
<view class="attention">
|
||||||
<view class="attention_box" v-for="(item,index) in attention" :key="index" @click="navto(item.friend_tomid)">
|
<view class="attention_box" v-for="(item,index) in attention" :key="index" @click="navto(item.friend_tomid)">
|
||||||
<view style="position:relative">
|
<view>
|
||||||
<image :src="item.friend_tomavatar" mode="aspectFill"></image>
|
<image :src="item.friend_tomavatar" mode="aspectFill"></image>
|
||||||
<view class="tishi" v-if="item.unread_message"></view>
|
|
||||||
</view>
|
</view>
|
||||||
<view>{{item.friend_tomname}}</view>
|
<view>{{item.friend_tomname}}</view>
|
||||||
<view>{{item.live_status ? '正在直播' : '未直播'}}</view>
|
<view>{{item.live_status ? '正在直播' : '未直播'}}</view>
|
||||||
<view class="cur_two" @click="tapClick(index)">已关注</view>
|
<view class="cur_two" @click="tapClick(index)" v-if = "item.about == 1">已关注</view>
|
||||||
<!-- <view class="cur" @click="tapClick(index)" v-else = "item.about == 2">未关注</view> -->
|
<view class="cur" @click="tapClick(index)" v-else = "item.about == 2">未关注</view>
|
||||||
</view>
|
</view>
|
||||||
<u-loadmore :status="status" icon-type="iconType" :load-text="loadText" />
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@@ -22,20 +19,9 @@
|
|||||||
return {
|
return {
|
||||||
rSelect:[],
|
rSelect:[],
|
||||||
type : '未关注',
|
type : '未关注',
|
||||||
attention: [],
|
attention: []
|
||||||
page:1,
|
|
||||||
status:'loadmore'
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onReachBottom(){
|
|
||||||
if(this.status == 'loading' || this.status == 'nomore'){
|
|
||||||
return ;
|
|
||||||
}else{
|
|
||||||
this.status = "loading"
|
|
||||||
this.page++
|
|
||||||
this.snsfriendList()
|
|
||||||
}
|
|
||||||
},
|
|
||||||
onLoad(){
|
onLoad(){
|
||||||
this.snsfriendList()
|
this.snsfriendList()
|
||||||
},
|
},
|
||||||
@@ -51,17 +37,8 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
snsfriendList(){
|
snsfriendList(){
|
||||||
this.$u.api.snsfriendList({page:this.page}).then((res)=>{
|
this.$u.api.snsfriendList({}).then((res)=>{
|
||||||
console.log(res)
|
this.attention = res.data;
|
||||||
if(this.page > 1){
|
|
||||||
this.attention.push(...res.data.data)
|
|
||||||
}else{
|
|
||||||
this.attention = res.data.data;
|
|
||||||
}
|
|
||||||
this.status = "loadmore"
|
|
||||||
if(res.data.data.length < 15){
|
|
||||||
this.status = "nomore"
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
navto(id){
|
navto(id){
|
||||||
@@ -81,15 +58,6 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.tishi{
|
|
||||||
position: absolute;
|
|
||||||
top: 5rpx;
|
|
||||||
left: 80rpx;
|
|
||||||
background-color: #ff5d00;
|
|
||||||
width: 12rpx;
|
|
||||||
height: 12rpx;
|
|
||||||
border-radius: 50%;
|
|
||||||
}
|
|
||||||
.attention {
|
.attention {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
|
|||||||
@@ -43,12 +43,12 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
getOrderLogistics(id) {
|
getOrderLogistics(id) {
|
||||||
this.$u.api.orderLogistics({ id: id }).then(res => {
|
this.$u.api.orderLogistics({ id: id }).then(res => {
|
||||||
|
this.$u.toast(res.message);
|
||||||
if(res.errCode == 0) {
|
if(res.errCode == 0) {
|
||||||
this.expressInfo = res.data.express_info;
|
this.expressInfo = res.data.express_info;
|
||||||
this.list = res.data.express_list;
|
this.list = res.data.express_list;
|
||||||
} else {
|
} else {
|
||||||
this.list = [];
|
this.list = [];
|
||||||
this.$u.toast(res.message);
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
16
pages.json
16
pages.json
@@ -178,7 +178,7 @@
|
|||||||
"searchInput": {
|
"searchInput": {
|
||||||
"align": "left",
|
"align": "left",
|
||||||
"borderRadius": "15px",
|
"borderRadius": "15px",
|
||||||
"placeholder": "请输入搜索内容",
|
"placeholder": "搜索您需要的商品",
|
||||||
"backgroundColor": "rgb(236,236,236)",
|
"backgroundColor": "rgb(236,236,236)",
|
||||||
"placeholderColor": "#999999",
|
"placeholderColor": "#999999",
|
||||||
"disabled": false,
|
"disabled": false,
|
||||||
@@ -198,7 +198,7 @@
|
|||||||
"searchInput": {
|
"searchInput": {
|
||||||
"align": "left",
|
"align": "left",
|
||||||
"borderRadius": "15px",
|
"borderRadius": "15px",
|
||||||
"placeholder": "请输入搜索内容",
|
"placeholder": "搜索您需要的商品",
|
||||||
"backgroundColor": "rgb(236,236,236)",
|
"backgroundColor": "rgb(236,236,236)",
|
||||||
"placeholderColor": "#999999",
|
"placeholderColor": "#999999",
|
||||||
"disabled": false,
|
"disabled": false,
|
||||||
@@ -238,18 +238,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"path": "coupon/index",
|
|
||||||
"style": {
|
|
||||||
"navigationStyle": "custom",
|
|
||||||
"app-plus": {
|
|
||||||
"animationType": "fade-in", // 设置fade-in淡入动画,为最合理的动画类型
|
|
||||||
"background": "transparent", // 背景透明
|
|
||||||
"backgroundColor": "rgba(0,0,0,0)", // 背景透明
|
|
||||||
"popGesture": "none" // 关闭IOS屏幕左边滑动关闭当前页面的功能
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"path": "coupon/details",
|
"path": "coupon/details",
|
||||||
"style": {
|
"style": {
|
||||||
|
|||||||
@@ -87,6 +87,13 @@
|
|||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper>
|
</swiper>
|
||||||
</view>
|
</view>
|
||||||
|
<u-popup v-model="showCoupon" mode="center" class="u-coupon-popup">
|
||||||
|
<view class="coupon">
|
||||||
|
<view class="price">{{ newMemberCoupon.price }}</view>
|
||||||
|
<image src="/static/image/common/30.png" class="coupon-image" @click="viewCoupon"></image>
|
||||||
|
<image src="/static/image/common/24.png" class="close-image" @click="showCoupon=false"></image>
|
||||||
|
</view>
|
||||||
|
</u-popup>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
@@ -204,6 +211,41 @@
|
|||||||
margin: 200rpx auto 0;
|
margin: 200rpx auto 0;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
.u-coupon-popup {
|
||||||
|
/deep/ .u-mode-center-box {
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
.coupon {
|
||||||
|
width: 750rpx;
|
||||||
|
height: 583rpx;
|
||||||
|
position: relative;
|
||||||
|
.price {
|
||||||
|
z-index: 3;
|
||||||
|
color: #EBB36E;
|
||||||
|
position: absolute;
|
||||||
|
font-size: 108rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
top: 200rpx;
|
||||||
|
left: 50%;
|
||||||
|
transform: translate(-68%, 0);
|
||||||
|
}
|
||||||
|
.coupon-image {
|
||||||
|
width: 568rpx;
|
||||||
|
height: 583rpx;
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 50%;
|
||||||
|
transform: translate(-60%, 0);
|
||||||
|
}
|
||||||
|
.close-image {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
right: 155rpx;
|
||||||
|
width: 60rpx;
|
||||||
|
height: 60rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
@@ -245,6 +287,9 @@
|
|||||||
loading: '努力加载中',
|
loading: '努力加载中',
|
||||||
nomore: '实在没有了'
|
nomore: '实在没有了'
|
||||||
},
|
},
|
||||||
|
showCoupon: false,
|
||||||
|
newMemberCoupon: {},
|
||||||
|
exchangestate:false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
@@ -254,6 +299,10 @@
|
|||||||
darenItem
|
darenItem
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
|
// 页面返回,页面登陆的情况下检查是否显示领取优惠卷优惠券弹窗
|
||||||
|
if(this.exchangestate==true){
|
||||||
|
this.isNewmembervoucher()
|
||||||
|
}
|
||||||
this.articleList = [];
|
this.articleList = [];
|
||||||
this.page = 0;
|
this.page = 0;
|
||||||
this.getArticlelist();
|
this.getArticlelist();
|
||||||
@@ -261,18 +310,18 @@
|
|||||||
},
|
},
|
||||||
onLoad(){
|
onLoad(){
|
||||||
if(this.$store.state.hasLogin){
|
if(this.$store.state.hasLogin){
|
||||||
this.isNewmembervoucher();
|
this.exchangestate = true
|
||||||
const user = uni.getStorageSync('user_info');
|
const user = uni.getStorageSync('user_info');
|
||||||
// console.log(user)
|
console.log(user)
|
||||||
this.imService.login(user.member.member_id,user.member.member_nickname,user.member.member_avatar)
|
this.imService.login(user.member.member_id,user.member.member_nickname,user.member.member_avatar)
|
||||||
this.imService.connectIM()
|
this.imService.connectIM()
|
||||||
let that = this
|
let that = this
|
||||||
setTimeout(function(){
|
setTimeout(function(){
|
||||||
that.imService.disconnect()
|
that.imService.disconnect()
|
||||||
// console.log("guanbi")
|
console.log("guanbi")
|
||||||
},1000)
|
},1000)
|
||||||
setTimeout(function(){
|
setTimeout(function(){
|
||||||
// console.log("lianjie")
|
console.log("lianjie")
|
||||||
that.imService.connectIM()
|
that.imService.connectIM()
|
||||||
},2000)
|
},2000)
|
||||||
}
|
}
|
||||||
@@ -299,7 +348,7 @@
|
|||||||
},
|
},
|
||||||
// 关注
|
// 关注
|
||||||
changeType(member_id) {
|
changeType(member_id) {
|
||||||
// console.log(member_id);
|
console.log(member_id);
|
||||||
// this.$emit("pChangeType");
|
// this.$emit("pChangeType");
|
||||||
this.$u.api.attentionMember({
|
this.$u.api.attentionMember({
|
||||||
member_id: member_id
|
member_id: member_id
|
||||||
@@ -463,17 +512,24 @@
|
|||||||
goSearch() {
|
goSearch() {
|
||||||
this.$u.route("/pageB/search/index", {
|
this.$u.route("/pageB/search/index", {
|
||||||
type: 2,
|
type: 2,
|
||||||
curent:2
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 是否显示新人优惠券
|
// 是否显示新人优惠券
|
||||||
isNewmembervoucher() {
|
isNewmembervoucher() {
|
||||||
this.$u.api.isNewmembervoucher().then(res => {
|
this.$u.api.isNewmembervoucher().then(res => {
|
||||||
if(res.errCode == 0) {
|
if(res.errCode == 0) {
|
||||||
this.$u.route('/pageB/coupon/index');
|
this.newMemberCoupon = res.data;
|
||||||
|
this.showCoupon = true;
|
||||||
|
} else {
|
||||||
|
this.showCoupon = false;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
viewCoupon() {
|
||||||
|
this.$u.route('/pageB/coupon/details', {
|
||||||
|
price: this.newMemberCoupon.price
|
||||||
|
});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user