Compare commits
172 Commits
1af3d1a003
...
xbx-new
| Author | SHA1 | Date | |
|---|---|---|---|
|
d5e4d52dbe
|
|||
|
d5d9e98534
|
|||
|
71a82a10b0
|
|||
| e3e470ab88 | |||
| 3d4ee2bd4c | |||
| 6af21ad216 | |||
| 9c026bf64d | |||
| 4436bbd282 | |||
| 27bdf1f2b0 | |||
| 76d13c5a71 | |||
|
6d4d2e5d8d
|
|||
|
6a25fe34a7
|
|||
| 0d96af99e1 | |||
|
5c47aa8e5c
|
|||
| 5ad768f842 | |||
|
|
e674a2c0df | ||
| 5194e15ec8 | |||
| 0a5115b8f4 | |||
| 1d8cd6512f | |||
| 6306573ee4 | |||
| 21b9995c1c | |||
| 065cea4e11 | |||
| f86e9ae009 | |||
| dddbabd207 | |||
| 6f344dc550 | |||
|
03c6779b96
|
|||
| 8518677f05 | |||
|
|
e0aafebcdc | ||
| e43003e0cd | |||
| 7f30cf8020 | |||
| 62d610b025 | |||
| 5806077877 | |||
| 50fb33d8e4 | |||
| 164dff3db5 | |||
| 5b287c7049 | |||
| fc44bb5fd6 | |||
| ecea27ccff | |||
| 3d2e0a9525 | |||
| 4b0cbcf814 | |||
|
|
ecb5f19fc0 | ||
| f54b94f0c6 | |||
| abda1f39f5 | |||
| 9e6c36b65a | |||
|
|
71fb73b61a | ||
|
|
83b06e2ab5 | ||
| b575501bb7 | |||
| d69486d1ab | |||
| d3c68b8c93 | |||
| 40e4d10bd7 | |||
| 7790481afb | |||
|
|
7c0720fab2 | ||
| 1f966b261e | |||
| 421112db2e | |||
| 920976dedd | |||
| 91a655e224 | |||
| 4e3665acc7 | |||
|
|
1643bf51b2 | ||
| d234176f22 | |||
|
b75e885e70
|
|||
| 9eaf84d496 | |||
| dbbd64269f | |||
|
677890a06d
|
|||
| dd3d3c17c4 | |||
|
|
78169d8cde | ||
|
|
7f0d1063f0 | ||
|
|
c81ee7e961 | ||
| 6864f22576 | |||
| a91fa4708b | |||
| bfffb44fe2 | |||
| 16c2c1fa71 | |||
| 4c8e2ba4b6 | |||
| 96d7ad439a | |||
| 390bda7c0e | |||
| 0ae19c2ddf | |||
|
26cb84748a
|
|||
| c6cd88dc48 | |||
|
a34880e6a6
|
|||
|
3d840a0546
|
|||
| 30539ddf64 | |||
| 51823edb12 | |||
|
e58f571de4
|
|||
| c4821f888f | |||
|
|
69760e6377 | ||
| 080f0c6d86 | |||
| 4e842b127c | |||
| 627cfc4aa0 | |||
| 1e94eb864f | |||
| 64597b26fa | |||
| 05b334fdcb | |||
| dc636e30b7 | |||
| f9950c4a14 | |||
| 5dff8c8d96 | |||
| 35da48a87b | |||
| 5dd4023f97 | |||
| 10957c96d6 | |||
| 86d765d6ba | |||
| bea615253c | |||
| 48f50dbc89 | |||
|
|
891f1b4194 | ||
| fb16e774b8 | |||
|
|
97c95c2024 | ||
|
|
9d8d54cf02 | ||
| 417ec2106e | |||
| 2b1b1f1395 | |||
| 18dd96dec7 | |||
| 6dd010fd42 | |||
|
|
41cda556ce | ||
| 6b4bfee380 | |||
| cb0a6fafa3 | |||
| fd1801de3d | |||
|
418068102c
|
|||
| 72fa854e78 | |||
| 2a382aa0b4 | |||
| bb651df8a0 | |||
|
9c388e898c
|
|||
| 473b96f552 | |||
| 1a2c40955b | |||
| 5291d70c6c | |||
|
f98cdd7937
|
|||
| 60913ab612 | |||
|
|
ee04a8cb08 | ||
| 711eeadc28 | |||
|
8286dbfa58
|
|||
|
cb95d1ead1
|
|||
| f577de11f1 | |||
| 689aecc572 | |||
| 8ba87795b3 | |||
|
|
e51675d2e7 | ||
|
43e09e977d
|
|||
|
|
91927fdc57 | ||
|
|
8f83aeec8e | ||
| d5202c02cc | |||
| 631e8ae3e6 | |||
|
|
b2b740c207 | ||
| 7191b29b44 | |||
|
|
50c790c7fc | ||
| ec8831152e | |||
| 6f5c2d1fc9 | |||
|
9f17c5478c
|
|||
| 41ea8122e6 | |||
| 06ee3b9038 | |||
| 5b763fdb82 | |||
| 31689af773 | |||
| caaea4de62 | |||
| cada935c17 | |||
| 9e9a6dcc5b | |||
| a702558eac | |||
| 2a180ba05f | |||
|
|
2a5e4b89b2 | ||
| fd31d14881 | |||
|
|
aae9f78a91 | ||
|
a39aa6e059
|
|||
| 3e6f7ebf1b | |||
|
35838e3a9e
|
|||
|
d0d034cd7f
|
|||
|
d8a92db5c2
|
|||
| 67a8316666 | |||
|
51d8f6a762
|
|||
| f77b4ebc02 | |||
|
|
b1a705e0f8 | ||
| c14b4338e9 | |||
|
ec3420a026
|
|||
|
aeb62f16ef
|
|||
| b7c9ec2354 | |||
|
9160a98de7
|
|||
| a5962d96df | |||
|
e7932d26ce
|
|||
| 8b98de3d8b | |||
|
c33ccebd25
|
|||
|
|
23b2b11bc8 | ||
|
|
21d3201c4b | ||
|
|
9a9276fc94 |
22
App.vue
@@ -20,6 +20,18 @@
|
|||||||
if (this.hasLogin) {
|
if (this.hasLogin) {
|
||||||
this.refreshToken_function();
|
this.refreshToken_function();
|
||||||
}
|
}
|
||||||
|
// #ifdef APP-PLUS
|
||||||
|
//app关闭默认的启动 方法关闭启动图。但是这个时间不能太晚,6s 超时后依旧会主动关闭。
|
||||||
|
setTimeout(()=>{
|
||||||
|
plus.navigator.closeSplashscreen();
|
||||||
|
},3000)
|
||||||
|
// #endif
|
||||||
|
},
|
||||||
|
onShow(){
|
||||||
|
this.getVersion();
|
||||||
|
},
|
||||||
|
onHide(){
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
...mapMutations(['loginIn']),
|
...mapMutations(['loginIn']),
|
||||||
@@ -33,6 +45,16 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
getVersion() {
|
||||||
|
this.$u.post("Specialci/checkVersion",{ app_version: this.$app_version }).then(res => {
|
||||||
|
// console.log(res);
|
||||||
|
if(res.data.app_version != this.$app_version) {
|
||||||
|
this.$u.route('/pageE/setting/updateVersion', {
|
||||||
|
status: res.data.is_focus_upgrade
|
||||||
|
});
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -49,4 +49,12 @@ unescapeHTML(temp){}
|
|||||||
* @return { object } promise 对象 resolve 返回文件服务器地址 reject 返回错误信息
|
* @return { object } promise 对象 resolve 返回文件服务器地址 reject 返回错误信息
|
||||||
*/
|
*/
|
||||||
uploadFile({ url, name, filePath }) {}
|
uploadFile({ url, name, filePath }) {}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 广告位跳转
|
||||||
|
* @param { String } type 跳转类型 1 商品 2 店铺 3 领取优惠券
|
||||||
|
* @param { String | Number } id 跳转id 商品id/商家id...
|
||||||
|
* @return { undefined } undefined
|
||||||
|
*/
|
||||||
|
jumpPage({ type, id }) ()
|
||||||
```
|
```
|
||||||
@@ -271,12 +271,13 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 我的优惠券(已有的)
|
// 我的优惠券(已有的)
|
||||||
getMemberCouponList({ store_id, gc_id, type, status }) {
|
getMemberCouponList({ store_id, gc_id, type, status, page }) {
|
||||||
return vm.$u.post('Coupon/getMemberCouponList', {
|
return vm.$u.post('Coupon/getMemberCouponList', {
|
||||||
store_id: store_id,
|
store_id: store_id,
|
||||||
gc_id: gc_id,
|
gc_id: gc_id,
|
||||||
type: type,
|
type: type,
|
||||||
status: status,
|
status: status,
|
||||||
|
page: page,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 获取直播列表
|
// 获取直播列表
|
||||||
@@ -360,8 +361,8 @@ export default {
|
|||||||
return vm.$u.post('Coupon/isNewmembervoucher')
|
return vm.$u.post('Coupon/isNewmembervoucher')
|
||||||
},
|
},
|
||||||
//待发货退款
|
//待发货退款
|
||||||
addrefundall() {
|
addrefundall({order_id,reason_info}) {
|
||||||
return vm.$u.post('order/add_refund_all')
|
return vm.$u.post('order/add_refund_all',{order_id,reason_info})
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -242,13 +242,17 @@ export default {
|
|||||||
if(type > 0) Object.assign(params, {type: type});
|
if(type > 0) Object.assign(params, {type: type});
|
||||||
return vm.$u.post('Order/orderList', params);
|
return vm.$u.post('Order/orderList', params);
|
||||||
},
|
},
|
||||||
|
// 各种订单数量
|
||||||
|
getOrderNumber() {
|
||||||
|
return vm.$u.post('order/orderNumber');
|
||||||
|
},
|
||||||
// 售后列表
|
// 售后列表
|
||||||
// getAfterSaleList({ page }) {
|
// getAfterSaleList({ page }) {
|
||||||
// return vm.$u.post('order/afterSaleList', { page: page });
|
// return vm.$u.post('order/afterSaleList', { page: page });
|
||||||
// },
|
// },
|
||||||
// 试穿列表
|
// 试穿列表
|
||||||
goodsTryOrderList() {
|
goodsTryOrderList({ page }) {
|
||||||
return vm.$u.post('order/goodsTryOrderList');
|
return vm.$u.post('order/goodsTryOrderList', { page });
|
||||||
},
|
},
|
||||||
// 试穿订单确认完成
|
// 试穿订单确认完成
|
||||||
goodsTryConfirm({ id }) {
|
goodsTryConfirm({ id }) {
|
||||||
@@ -353,6 +357,12 @@ export default {
|
|||||||
code: code,
|
code: code,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
// 获取可送洗商品
|
||||||
|
getSendOrderList({ page }) {
|
||||||
|
return vm.$u.post('member/getSendOrderList', {
|
||||||
|
page: page,
|
||||||
|
});
|
||||||
|
},
|
||||||
// 送洗列表-平台订单 实体店订单
|
// 送洗列表-平台订单 实体店订单
|
||||||
sendLaundryOrderList({ type, page }) {
|
sendLaundryOrderList({ type, page }) {
|
||||||
return vm.$u.post('member/sendLaundryOrderList', {
|
return vm.$u.post('member/sendLaundryOrderList', {
|
||||||
@@ -421,7 +431,7 @@ export default {
|
|||||||
couponGoodsList({ voucher_id, page, order }) {
|
couponGoodsList({ voucher_id, page, order }) {
|
||||||
return vm.$u.post('Coupon/couponGoodsList', {
|
return vm.$u.post('Coupon/couponGoodsList', {
|
||||||
page: page,
|
page: page,
|
||||||
voucher_id: voucher_id,
|
vouchertemplate_id: voucher_id,
|
||||||
order: order,
|
order: order,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ var md5 = require("../static/js/md5.min.js")
|
|||||||
const install = (Vue, vm) => {
|
const install = (Vue, vm) => {
|
||||||
// 此为自定义配置参数,具体参数见上方说明
|
// 此为自定义配置参数,具体参数见上方说明
|
||||||
Vue.prototype.$u.http.setConfig({
|
Vue.prototype.$u.http.setConfig({
|
||||||
baseUrl: 'https://dmmall.sdbairui.com/api',
|
baseUrl: 'https://mall.dmygkeji.com/api',
|
||||||
loadingText: '努力加载中~',
|
loadingText: '努力加载中~',
|
||||||
loadingTime: 800,
|
loadingTime: 800,
|
||||||
originalData: true
|
originalData: true
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ const store = new Vuex.Store({
|
|||||||
token: "", // 储存token
|
token: "", // 储存token
|
||||||
showLoginModel: false, // 登录框
|
showLoginModel: false, // 登录框
|
||||||
question: {}, // 帮助与反馈
|
question: {}, // 帮助与反馈
|
||||||
|
showCoupons: true, // 是否显示新人领取优惠券
|
||||||
},
|
},
|
||||||
getters: {
|
getters: {
|
||||||
getOrderAddress(state) {
|
getOrderAddress(state) {
|
||||||
@@ -79,6 +80,9 @@ const store = new Vuex.Store({
|
|||||||
},
|
},
|
||||||
setQuestion(state, question) {
|
setQuestion(state, question) {
|
||||||
state.question = question;
|
state.question = question;
|
||||||
|
},
|
||||||
|
updateShowCoupons(state, status) {
|
||||||
|
state.showCoupons = status;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
<view class="text">{{ content.geval_content }}</view>
|
<view class="text">{{ content.geval_content }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="image-container">
|
<view class="image-container">
|
||||||
<image :src="src" v-for="(src, index) in content.geval_image" :key="index"></image>
|
<image :src="src" v-for="(src, index) in content.geval_image" :key="index" @click="previewImage(content.geval_image)"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="reply" v-if="reply && content.geval_explain">
|
<view class="reply" v-if="reply && content.geval_explain">
|
||||||
<view class="title">掌柜回复:</view>
|
<view class="title">掌柜回复:</view>
|
||||||
@@ -39,6 +39,14 @@ export default {
|
|||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
if(this.content.hasOwnProperty('scores_two')) this.rate = this.content.scores_two;
|
if(this.content.hasOwnProperty('scores_two')) this.rate = this.content.scores_two;
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
previewImage(urls) {
|
||||||
|
console.log(urls);
|
||||||
|
// uni.previewImage({
|
||||||
|
// urls: urls,
|
||||||
|
// });
|
||||||
|
},
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -2,8 +2,11 @@
|
|||||||
<view class="video-item" v-if="item" @click="toDetailsPage(item.article_id,item.video_path)">
|
<view class="video-item" v-if="item" @click="toDetailsPage(item.article_id,item.video_path)">
|
||||||
<image class="head" :src="item.article_pic" v-if="item.type == 1"></image>
|
<image class="head" :src="item.article_pic" v-if="item.type == 1"></image>
|
||||||
<view class="header_fist" v-else>
|
<view class="header_fist" v-else>
|
||||||
<view class="backes"></view>
|
<view class="backes">
|
||||||
<image class="head" :src="item.article_pic" ></image>
|
<u-icon name="play-circle-fill" color="#ffffff" size="20"></u-icon>
|
||||||
|
<text>视频</text>
|
||||||
|
</view>
|
||||||
|
<image class="head" :src="item.article_pic" mode="aspectFill"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="title" v-if="">{{ item.article_title }}</view>
|
<view class="title" v-if="">{{ item.article_title }}</view>
|
||||||
<view class="jianjie">{{ item.article_content }}</view>
|
<view class="jianjie">{{ item.article_content }}</view>
|
||||||
@@ -12,7 +15,7 @@
|
|||||||
<image :src="item.member_avatar"></image>
|
<image :src="item.member_avatar"></image>
|
||||||
<text>{{ item.member_nickname }}</text>
|
<text>{{ item.member_nickname }}</text>
|
||||||
</view>
|
</view>
|
||||||
<image src="/static/image/common/4.png" @click.stop="showAction"></image>
|
<image class="img-imp" src="/static/image/common/4.png" @click.stop="showAction"></image>
|
||||||
<view class="action" v-if="show == item.article_id">
|
<view class="action" v-if="show == item.article_id">
|
||||||
<view class="bubble">
|
<view class="bubble">
|
||||||
<view @click.stop="articleLike">
|
<view @click.stop="articleLike">
|
||||||
@@ -61,6 +64,7 @@
|
|||||||
display:-webkit-box;
|
display:-webkit-box;
|
||||||
-webkit-box-orient:vertical;
|
-webkit-box-orient:vertical;
|
||||||
-webkit-line-clamp:2;
|
-webkit-line-clamp:2;
|
||||||
|
height: 80rpx;
|
||||||
}
|
}
|
||||||
.jianjie{
|
.jianjie{
|
||||||
margin:0 auto;
|
margin:0 auto;
|
||||||
@@ -100,8 +104,9 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
>image{
|
>image{
|
||||||
width: 37rpx;
|
width: 35rpx;
|
||||||
height: 8rpx;
|
height: 8rpx;
|
||||||
|
padding: 20rpx;
|
||||||
}
|
}
|
||||||
.action {
|
.action {
|
||||||
z-index: 19;
|
z-index: 19;
|
||||||
@@ -172,11 +177,22 @@
|
|||||||
.header_fist{
|
.header_fist{
|
||||||
position: relative;
|
position: relative;
|
||||||
.backes{
|
.backes{
|
||||||
|
z-index: 99;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
display: flex;
|
||||||
width: 100%;
|
align-items: center;
|
||||||
height: 100%;
|
justify-content: space-around;
|
||||||
|
top: 10rpx;
|
||||||
|
left: 10rpx;
|
||||||
|
width: 80rpx;
|
||||||
|
height: 30rpx;
|
||||||
|
padding: 0 10rpx;
|
||||||
|
border-radius: 30rpx;
|
||||||
|
background-color: rgba(0,0,0,0.5);
|
||||||
|
& > text {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
|
font-size: 18rpx;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -242,6 +258,8 @@ export default {
|
|||||||
if(res.errCode == 0) {
|
if(res.errCode == 0) {
|
||||||
this.$u.toast(res.message);
|
this.$u.toast(res.message);
|
||||||
this.$emit("updateList");
|
this.$emit("updateList");
|
||||||
|
} else {
|
||||||
|
this.$u.toast(res.message);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="notice">
|
<view class="notice" :style="{height : height + 'px'}">
|
||||||
<view v-for="(item,index) in notice" :key="index" @click="gotoInfo(index)">
|
<view v-for="(item,index) in notice" :key="index" @click="gotoInfo(index)">
|
||||||
<view class="time_notice">{{ item.addtime }}</view>
|
<view class="time_notice">{{ item.addtime }}</view>
|
||||||
<view class="notice_view">
|
<view class="notice_view">
|
||||||
@@ -36,6 +36,7 @@
|
|||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
line-height: 40rpx;
|
line-height: 40rpx;
|
||||||
|
letter-spacing: 2rpx;
|
||||||
}
|
}
|
||||||
.notice_view > view:nth-child(3){
|
.notice_view > view:nth-child(3){
|
||||||
height: 84rpx;
|
height: 84rpx;
|
||||||
@@ -77,7 +78,8 @@
|
|||||||
props: ['list'],
|
props: ['list'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
notice : []
|
notice : [],
|
||||||
|
height : ''
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@@ -86,6 +88,8 @@
|
|||||||
this.notice = newVal;
|
this.notice = newVal;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
onLoad() {
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
gotoInfo(index) {
|
gotoInfo(index) {
|
||||||
console.log(index);
|
console.log(index);
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
<view class="c-coupon">
|
<view class="c-coupon">
|
||||||
<view class="coupon-usable">
|
<view class="coupon-usable">
|
||||||
<view class="info-type" :style="{ backgroundImage: 'url(' + '/static/image/mine/30.png' + ')', backgroundSize:'contain', backgroundRepeat: 'no-repeat' }">
|
<view class="info-type" :style="{ backgroundImage: 'url(' + '/static/image/mine/30.png' + ')', backgroundSize:'contain', backgroundRepeat: 'no-repeat' }">
|
||||||
<div class="wrap_left_top"></div>
|
<div class="wrap_left_top" v-if="couponInfo.type == 1">{{ couponInfo.vouchertemplate_id == 1 ? '新人专享' : '平台优惠券' }}</div>
|
||||||
{{ couponInfo.type == 2 ? '店铺优惠券' : '平台优惠券' }}
|
<div class="wrap_left_top" v-else-if="couponInfo.type == 2">店铺优惠券</div>
|
||||||
</view>
|
</view>
|
||||||
<view class="coupon-info">
|
<view class="coupon-info">
|
||||||
<view class="info-usable">
|
<view class="info-usable">
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
<view class="c-coupon" v-if="goodsClass.length">
|
<view class="c-coupon" v-if="goodsClass.length">
|
||||||
<view :class="couponInfo.voucher_state != 1 ? 'coupon-unable' : 'coupon-usable'">
|
<view :class="couponInfo.voucher_state != 1 ? 'coupon-unable' : 'coupon-usable'">
|
||||||
<view class="info-type" :style="{ backgroundImage: 'url(' + (couponInfo.voucher_state == 1 ? '/static/image/mine/30.png' : '/static/image/mine/31.png') + ')', backgroundSize:'contain', backgroundRepeat: 'no-repeat' }">
|
<view class="info-type" :style="{ backgroundImage: 'url(' + (couponInfo.voucher_state == 1 ? '/static/image/mine/30.png' : '/static/image/mine/31.png') + ')', backgroundSize:'contain', backgroundRepeat: 'no-repeat' }">
|
||||||
<div class="wrap_left_top"></div>
|
<div class="wrap_left_top" v-if="couponInfo.type == 1">{{ couponInfo.vouchertemplate_id == 1 ? '新人专享' : '平台优惠券' }}</div>
|
||||||
{{ couponInfo.type == 2 ? '店铺优惠券' : '平台优惠券' }}
|
<div class="wrap_left_top" v-else-if="couponInfo.type == 2">店铺优惠券</div>
|
||||||
</view>
|
</view>
|
||||||
<view class="coupon-info">
|
<view class="coupon-info">
|
||||||
<view class="info-usable">
|
<view class="info-usable">
|
||||||
|
|||||||
@@ -50,8 +50,8 @@
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
remaining: 7,
|
remaining: 7,
|
||||||
type: true,
|
type: false,
|
||||||
banner: false,
|
banner: true,
|
||||||
protocol: false,
|
protocol: false,
|
||||||
heightOut: '',
|
heightOut: '',
|
||||||
imgurl: [],
|
imgurl: [],
|
||||||
@@ -116,18 +116,18 @@
|
|||||||
},
|
},
|
||||||
// 3秒倒计时
|
// 3秒倒计时
|
||||||
remaining_time() {
|
remaining_time() {
|
||||||
this.timer = setInterval(() => {
|
// this.timer = setInterval(() => {
|
||||||
this.remaining--;
|
// this.remaining--;
|
||||||
if (this.remaining <= 0) {
|
// if (this.remaining <= 0) {
|
||||||
clearInterval(this.timer);
|
// clearInterval(this.timer);
|
||||||
console.log("完了")
|
// console.log("完了")
|
||||||
this.type = !this.type;
|
// // this.type = !this.type;
|
||||||
this.banner = !this.banner;
|
// // this.banner = !this.banner;
|
||||||
}
|
// }
|
||||||
}, 1000);
|
// }, 1000);
|
||||||
},
|
},
|
||||||
leap_over() {
|
leap_over() {
|
||||||
this.type = !this.type
|
// this.type = !this.type
|
||||||
this.banner = !this.banner;
|
this.banner = !this.banner;
|
||||||
clearInterval(this.timer)
|
clearInterval(this.timer)
|
||||||
// 获取屏幕高度
|
// 获取屏幕高度
|
||||||
|
|||||||
@@ -8,13 +8,12 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="label">
|
<view class="label">
|
||||||
<!-- <u-tabs-swiper ref="group" :list="classifyList" name="gc_name" :is-scroll="true" active-color="#FF780F" :current="current" font-size="24" :show-bar="false" @change="tabsChange" height="60"></u-tabs-swiper> -->
|
|
||||||
<u-tabs :list="classifyList" name="gc_name" :is-scroll="true" :current="current" @change="tabsChange" active-color="#FF780F" :show-bar="false" height="60" font-size="24" inactive-color="#333333"></u-tabs>
|
<u-tabs :list="classifyList" name="gc_name" :is-scroll="true" :current="current" @change="tabsChange" active-color="#FF780F" :show-bar="false" height="60" font-size="24" inactive-color="#333333"></u-tabs>
|
||||||
</view>
|
</view>
|
||||||
<swiper :current="swiperCurrent" @animationfinish="animationfinish" style="height: 340rpx;">
|
<swiper :current="swiperCurrent" @animationfinish="animationfinish" style="height: 340rpx;">
|
||||||
<swiper-item class="swiper-item list" v-for="(_, i) in classifyList" :key="i">
|
<swiper-item class="swiper-item list" v-for="(_, i) in classifyList" :key="i">
|
||||||
<!-- 最多显示3个 -->
|
<!-- 最多显示3个 -->
|
||||||
<view v-if="groupList[i]">
|
<view v-if="groupList[i]" class="group-container">
|
||||||
<sitem :info="info" v-for="(info, index) in groupList[i].slice(0, 3)" :key="index"></sitem>
|
<sitem :info="info" v-for="(info, index) in groupList[i].slice(0, 3)" :key="index"></sitem>
|
||||||
</view>
|
</view>
|
||||||
<u-empty text="暂无拼团商品" mode="list" color="#000" v-if="!groupList[i] || !groupList[i].length" style="margin: 0 auto;"></u-empty>
|
<u-empty text="暂无拼团商品" mode="list" color="#000" v-if="!groupList[i] || !groupList[i].length" style="margin: 0 auto;"></u-empty>
|
||||||
@@ -62,7 +61,7 @@ export default {
|
|||||||
gc_id: id,
|
gc_id: id,
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
this.groupList[this.current] = res.data;
|
this.groupList[this.current] = res.data;
|
||||||
// console.log(this.groupList);
|
console.log(this.groupList);
|
||||||
this.$forceUpdate();
|
this.$forceUpdate();
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -106,6 +105,7 @@ export default {
|
|||||||
.list {
|
.list {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 0 30rpx;
|
padding: 0 30rpx;
|
||||||
|
.group-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
> view {
|
> view {
|
||||||
&:not(:nth-child(3n)) {
|
&:not(:nth-child(3n)) {
|
||||||
@@ -114,4 +114,5 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -3,8 +3,8 @@
|
|||||||
<image class="head" :src="info.pintuan_image" mode="widthFix"></image>
|
<image class="head" :src="info.pintuan_image" mode="widthFix"></image>
|
||||||
<text class="title u-line-1">{{ info.pintuan_goods_name }}</text>
|
<text class="title u-line-1">{{ info.pintuan_goods_name }}</text>
|
||||||
<view class="price">
|
<view class="price">
|
||||||
<view>¥{{ info.pintuan_goods_price }}</view>
|
<view class="value">¥{{ info.pintuan_goods_price }}</view>
|
||||||
<view>立即拼团</view>
|
<view class="btn">立即拼团</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@@ -61,18 +61,22 @@ export default {
|
|||||||
margin-top: 10rpx;
|
margin-top: 10rpx;
|
||||||
}
|
}
|
||||||
.price{
|
.price{
|
||||||
// display: flex;
|
display: flex;
|
||||||
// align-items: center;
|
align-items: center;
|
||||||
// justify-content: space-between;
|
// align-content: flex-end;
|
||||||
margin-top: 10rpx;
|
justify-content: space-between;
|
||||||
> view:first-child{
|
margin-top: 16rpx;
|
||||||
|
.value {
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
color: #FF3131;
|
color: #FF3131;
|
||||||
margin-bottom: 12rpx;
|
// margin-bottom: 12rpx;
|
||||||
}
|
}
|
||||||
> view:last-child{
|
.btn {
|
||||||
font-size: 22rpx;
|
font-size: 22rpx;
|
||||||
|
height: 22rpx;
|
||||||
color: #FDD360;
|
color: #FDD360;
|
||||||
|
text-align: end;
|
||||||
|
// margin-top:8rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
<view class="list">
|
<view class="list">
|
||||||
<view class="top">商品推荐</view>
|
<view class="top">商品推荐</view>
|
||||||
<view>
|
<view>
|
||||||
<!-- <u-tabs-swiper ref="uTabs" :list="classifyList" name="gc_name" :is-scroll="true" active-color="#FF780F" :current="current" font-size="26" :show-bar="false" @change="tabsChange" height="60"></u-tabs-swiper> -->
|
|
||||||
<u-tabs :list="classifyList" name="gc_name" :is-scroll="true" :current="current" @change="tabsChange" active-color="#FF780F" :show-bar="false" height="60" font-size="24" inactive-color="#333333"></u-tabs>
|
<u-tabs :list="classifyList" name="gc_name" :is-scroll="true" :current="current" @change="tabsChange" active-color="#FF780F" :show-bar="false" height="60" font-size="24" inactive-color="#333333"></u-tabs>
|
||||||
</view>
|
</view>
|
||||||
<swiper class="swiper-box" :current="swiperCurrent" @animationfinish="animationfinish" :style="{height: swiperHeight}">
|
<swiper class="swiper-box" :current="swiperCurrent" @animationfinish="animationfinish" :style="{height: swiperHeight}">
|
||||||
@@ -49,7 +48,7 @@ export default {
|
|||||||
this.getGoodsClassRecommend();
|
this.getGoodsClassRecommend();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
loadMore(page) {
|
loadMore() {
|
||||||
if(!this.timer) return false;
|
if(!this.timer) return false;
|
||||||
this.loadStatus = "loading";
|
this.loadStatus = "loading";
|
||||||
this.page++;
|
this.page++;
|
||||||
@@ -72,6 +71,7 @@ export default {
|
|||||||
},
|
},
|
||||||
getGoodsClassRecommend() {
|
getGoodsClassRecommend() {
|
||||||
this.$u.api.getGoodsClassRecommend().then(res => {
|
this.$u.api.getGoodsClassRecommend().then(res => {
|
||||||
|
console.log(res)
|
||||||
if (res.errCode == 0) {
|
if (res.errCode == 0) {
|
||||||
// 初始化 current
|
// 初始化 current
|
||||||
this.current = 0;
|
this.current = 0;
|
||||||
@@ -97,7 +97,7 @@ export default {
|
|||||||
},
|
},
|
||||||
setSwiperHeight() {
|
setSwiperHeight() {
|
||||||
// height: 480rpx, margin-bottom: 26rpx
|
// height: 480rpx, margin-bottom: 26rpx
|
||||||
const height = Math.ceil(this.goodsList[this.current].length / 2) * (480 + 26);
|
const height = Math.ceil(this.goodsList[this.current].length / 2) * (450 + 26);
|
||||||
this.swiperHeight = height == 0 ? '230rpx' : height + 'rpx';
|
this.swiperHeight = height == 0 ? '230rpx' : height + 'rpx';
|
||||||
// console.log(this.swiperHeight);
|
// console.log(this.swiperHeight);
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<view class="info">
|
<view class="info">
|
||||||
<text class="title u-line-2">{{ info.goods_name }}</text>
|
<text class="title u-line-2">{{ info.goods_name }}</text>
|
||||||
<!-- <text class="jianjie u-line-1">{{ info.goods_advword }}</text> -->
|
<!-- <text class="jianjie u-line-1">{{ info.goods_advword }}</text> -->
|
||||||
<text class="price">¥{{ info.goods_price }}</text>
|
<text class="price">¥{{ info.goods_price }}<text style="font-size:22rpx;color:#999;text-decoration:line-through;display: inline-block;margin-left:20rpx"> ¥{{info.goods_marketprice}}</text></text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@@ -44,14 +44,14 @@ export default {
|
|||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.item{
|
.item{
|
||||||
width: 330rpx;
|
width: 330rpx;
|
||||||
height: 480rpx;
|
height: 450rpx;
|
||||||
margin-bottom: 26rpx;
|
margin-bottom: 26rpx;
|
||||||
background-color: #f8f8f8;
|
background-color: #f8f8f8;
|
||||||
border-radius: 10rpx 10rpx 0rpx 0rpx;
|
border-radius: 10rpx 10rpx 0rpx 0rpx;
|
||||||
.img{
|
.img{
|
||||||
width: 330rpx;
|
width: 330rpx;
|
||||||
height: 300rpx;
|
height: 300rpx;
|
||||||
background: rgba(245,245,245,1);
|
background: rgb(114, 110, 110);
|
||||||
border-radius: 10rpx 10rpx 0rpx 0rpx;
|
border-radius: 10rpx 10rpx 0rpx 0rpx;
|
||||||
margin-bottom: 24rpx;
|
margin-bottom: 24rpx;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,8 +10,8 @@
|
|||||||
<view class="connect">
|
<view class="connect">
|
||||||
<view class="user">
|
<view class="user">
|
||||||
<view class="avatar">
|
<view class="avatar">
|
||||||
<image :src="info.member_avatar[0]"></image>
|
<image src="/static/image/common/32.png"></image>
|
||||||
<image :src="info.member_avatar[1]"></image>
|
<image src="/static/image/common/31.png"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="num">{{ info.pintuan_limit_number }}人团</view>
|
<view class="num">{{ info.pintuan_limit_number }}人团</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -91,7 +91,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.connect{
|
.connect{
|
||||||
padding:10rpx 30rpx 30rpx;
|
padding:10rpx 0 30rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
.user {
|
.user {
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="next" @click="viewMore">
|
<view class="next" @click="viewMore">
|
||||||
<text>查看更多</text>
|
<text>查看更多</text>
|
||||||
<u-icon name="arrow-right" color="#999" size="18"></u-icon>
|
<u-icon name="arrow-right" color="#999" size="22"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="list">
|
<view class="list">
|
||||||
@@ -82,7 +82,7 @@ export default {
|
|||||||
background-color: #000;
|
background-color: #000;
|
||||||
}
|
}
|
||||||
.mah {
|
.mah {
|
||||||
vertical-align: text-top;
|
color: #999999;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,26 +1,26 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="special">
|
<view class="special">
|
||||||
<view v-if="type == 'spike'">
|
<view v-if="type == 'spike'" @click="spikeGoods">
|
||||||
<image :src="item.groupbuy_image1" @click="spikeGoods"></image>
|
<image :src="item.groupbuy_image1" mode="aspectFill"></image>
|
||||||
<view class="right">
|
<view class="right">
|
||||||
<view class="name u-line-1" @click="spikeGoods">{{ item.goods_name }}</view>
|
<view class="name u-line-1">{{ item.goods_name }}</view>
|
||||||
<view class="price">
|
<view class="price">
|
||||||
<view class="groupbuy-price">¥{{ item.groupbuy_price }}</view>
|
<view class="groupbuy-price">¥{{ item.groupbuy_price }}</view>
|
||||||
<view class="goods-price">¥{{ item.goods_price }}</view>
|
<view class="goods-price">¥{{ item.goods_price }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="buy">
|
<view class="buy">
|
||||||
<view class="num">剩余{{ item.inventory }}件</view>
|
<view class="num">剩余{{ item.inventory }}件</view>
|
||||||
<view class="btn" @click="spikeGoods">立即购买</view>
|
<view class="btn">立即购买</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="type == 'group'">
|
<view v-if="type == 'group'" @click="toDetailsPage">
|
||||||
<image :src="item.pintuan_image" @click="toDetailsPage"></image>
|
<image :src="item.pintuan_image"></image>
|
||||||
<view class="right">
|
<view class="right">
|
||||||
<view class="name u-line-1" @click="toDetailsPage">{{ item.pintuan_goods_name }}</view>
|
<view class="name u-line-1">{{ item.pintuan_goods_name }}</view>
|
||||||
<view class="price group">
|
<view class="price group">
|
||||||
<view class="groupbuy-price">¥{{ item.pintuan_goods_price }}</view>
|
<view class="groupbuy-price">¥{{ item.pintuan_goods_price }}</view>
|
||||||
<view class="btn" @click="toDetailsPage">立即拼团</view>
|
<view class="btn">立即拼团</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -2,11 +2,12 @@
|
|||||||
<view class="coupon-swiper">
|
<view class="coupon-swiper">
|
||||||
<view class="top">
|
<view class="top">
|
||||||
<view class="title">全部优惠券</view>
|
<view class="title">全部优惠券</view>
|
||||||
<view class="view-more" @click="toCouponPage">查看更多></view>
|
<view class="view-more" @click="toCouponPage">
|
||||||
|
<text>查看更多</text>
|
||||||
|
<u-icon name="arrow-right" color="#999" size="22"></u-icon>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- <u-tabs-swiper ref="coupon" :list="couponGroupList" name="gc_name" :is-scroll="true" active-color="#FF780F" :current="couponCurrent" font-size="24" :show-bar="false" @change="couponTabsChange" height="60" ></u-tabs-swiper> -->
|
|
||||||
<u-tabs :list="couponGroupList" name="gc_name" :is-scroll="true" :current="couponCurrent" @change="couponTabsChange" active-color="#FF780F" :show-bar="false" height="60" font-size="24" inactive-color="#333333"></u-tabs>
|
<u-tabs :list="couponGroupList" name="gc_name" :is-scroll="true" :current="couponCurrent" @change="couponTabsChange" active-color="#FF780F" :show-bar="false" height="60" font-size="24" inactive-color="#333333"></u-tabs>
|
||||||
<!-- :style="{ height: swiperHeight }" -->
|
|
||||||
<swiper class="box" :current="swiperCouponCurrent" @animationfinish="couponAnimationFinish" :style="{height: swiperHeight}">
|
<swiper class="box" :current="swiperCouponCurrent" @animationfinish="couponAnimationFinish" :style="{height: swiperHeight}">
|
||||||
<swiper-item class="swiper-coupon-item" v-for="(_, i) in couponGroupList" :key="i">
|
<swiper-item class="swiper-coupon-item" v-for="(_, i) in couponGroupList" :key="i">
|
||||||
<!-- 最多显示四个 -->
|
<!-- 最多显示四个 -->
|
||||||
@@ -114,6 +115,8 @@ export default {
|
|||||||
.view-more {
|
.view-more {
|
||||||
font-size: 20rpx;
|
font-size: 20rpx;
|
||||||
color: rgba(153,153,153,1);
|
color: rgba(153,153,153,1);
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.box {
|
.box {
|
||||||
|
|||||||
4
main.js
@@ -5,6 +5,10 @@ import uView from "uview-ui";
|
|||||||
Vue.config.productionTip = false
|
Vue.config.productionTip = false
|
||||||
Vue.use(uView);
|
Vue.use(uView);
|
||||||
App.mpType = 'app'
|
App.mpType = 'app'
|
||||||
|
|
||||||
|
// 当前 app 版本号
|
||||||
|
Vue.prototype.$app_version = '1.0.0';
|
||||||
|
|
||||||
Vue.prototype.imService = new IMService();
|
Vue.prototype.imService = new IMService();
|
||||||
Vue.prototype.a = 1;
|
Vue.prototype.a = 1;
|
||||||
import store from '@/common/store/index.js'
|
import store from '@/common/store/index.js'
|
||||||
|
|||||||
@@ -11,8 +11,8 @@
|
|||||||
"nvueCompiler" : "uni-app",
|
"nvueCompiler" : "uni-app",
|
||||||
"compilerVersion" : 3,
|
"compilerVersion" : 3,
|
||||||
"splashscreen" : {
|
"splashscreen" : {
|
||||||
"alwaysShowBeforeRender" : true,
|
"alwaysShowBeforeRender" : false,
|
||||||
"waiting" : true,
|
"waiting" : false,
|
||||||
"autoclose" : true,
|
"autoclose" : true,
|
||||||
"delay" : 0
|
"delay" : 0
|
||||||
},
|
},
|
||||||
@@ -112,22 +112,22 @@
|
|||||||
},
|
},
|
||||||
"icons" : {
|
"icons" : {
|
||||||
"android" : {
|
"android" : {
|
||||||
"hdpi" : "static/app/icon/72x72.png",
|
"hdpi" : "E:/Source-code/appleidmore/安卓png/72x72psd.PNG",
|
||||||
"xhdpi" : "static/app/icon/96x96.png",
|
"xhdpi" : "E:/Source-code/appleidmore/安卓png/96x96psd.PNG",
|
||||||
"xxhdpi" : "static/app/icon/144x144.png",
|
"xxhdpi" : "E:/Source-code/appleidmore/安卓png/144x144.PNG",
|
||||||
"xxxhdpi" : "static/app/icon/192x192.png"
|
"xxxhdpi" : "E:/Source-code/appleidmore/安卓png/192x192.PNG"
|
||||||
},
|
},
|
||||||
"ios" : {
|
"ios" : {
|
||||||
"appstore" : "unpackage/res/icons/1024x1024.png",
|
"appstore" : "E:/Source-code/appleidmore/苹果png/appstore 1024X1024.PNG",
|
||||||
"iphone" : {
|
"iphone" : {
|
||||||
"app@2x" : "unpackage/res/icons/120x120.png",
|
"app@2x" : "E:/Source-code/appleidmore/苹果png/120x120.PNG",
|
||||||
"app@3x" : "unpackage/res/icons/180x180.png",
|
"app@3x" : "E:/Source-code/appleidmore/苹果png/180x180.PNG",
|
||||||
"spotlight@2x" : "unpackage/res/icons/80x80.png",
|
"spotlight@2x" : "E:/Source-code/appleidmore/苹果png/80x80.PNG",
|
||||||
"spotlight@3x" : "unpackage/res/icons/120x120.png",
|
"spotlight@3x" : "E:/Source-code/appleidmore/苹果png/120x120.PNG",
|
||||||
"settings@2x" : "unpackage/res/icons/58x58.png",
|
"settings@2x" : "E:/Source-code/appleidmore/苹果png/58x58psd.PNG",
|
||||||
"settings@3x" : "unpackage/res/icons/87x87.png",
|
"settings@3x" : "E:/Source-code/appleidmore/苹果png/87X87.PNG",
|
||||||
"notification@2x" : "unpackage/res/icons/40x40.png",
|
"notification@2x" : "E:/Source-code/appleidmore/苹果png/40X40.PNG",
|
||||||
"notification@3x" : "unpackage/res/icons/60x60.png"
|
"notification@3x" : "E:/Source-code/appleidmore/苹果png/60X60.PNG"
|
||||||
},
|
},
|
||||||
"ipad" : {
|
"ipad" : {
|
||||||
"app" : "unpackage/res/icons/76x76.png",
|
"app" : "unpackage/res/icons/76x76.png",
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="labales flex-inp">
|
<view class="labales flex-inp">
|
||||||
<input type="number" maxlength="6" placeholder="请输入验证码" v-model="sms_code" />
|
<input type="number" maxlength="6" placeholder="请输入验证码" v-model="sms_code" />
|
||||||
<button class="identifying" :class="is_sendcode ? 'sended' : ''" @click="getCode" :disabled="is_sendcode">{{ is_sendcode ? time_count + "后可以重新发送" : "发送验证码" }}</button>
|
<u-button id="btn" class="identifying" :hair-line="false" hover-class="none" :class="is_sendcode ? 'sended' : ''" @click="getCode" :disabled="is_sendcode">{{ is_sendcode ? time_count + "后可以重新发送" : "发送验证码" }}</u-button>
|
||||||
</view>
|
</view>
|
||||||
<!-- 服务协议 -->
|
<!-- 服务协议 -->
|
||||||
<view class="pact">
|
<view class="pact">
|
||||||
@@ -133,8 +133,8 @@
|
|||||||
title: res.message,
|
title: res.message,
|
||||||
type: 'success',
|
type: 'success',
|
||||||
})
|
})
|
||||||
uni.switchTab({
|
uni.navigateTo({
|
||||||
url: '/pages/index/index'
|
url: '/pageA/topick/topick'
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.$refs.uToast.show({
|
this.$refs.uToast.show({
|
||||||
|
|||||||
@@ -61,6 +61,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
import IMService from '@/static/imservice.js'
|
||||||
import identifying from '@/components/logininput/identifying'
|
import identifying from '@/components/logininput/identifying'
|
||||||
import {
|
import {
|
||||||
mapMutations
|
mapMutations
|
||||||
@@ -107,6 +108,8 @@
|
|||||||
let pages = getCurrentPages();
|
let pages = getCurrentPages();
|
||||||
let prePage = pages[pages.length - 2];
|
let prePage = pages[pages.length - 2];
|
||||||
this.temp_url = prePage.route;
|
this.temp_url = prePage.route;
|
||||||
|
console.log(this.imService.lianjie)
|
||||||
|
this.imService.disconnect()
|
||||||
// console.log(this.temp_url);
|
// console.log(this.temp_url);
|
||||||
},
|
},
|
||||||
// 切断正常返回
|
// 切断正常返回
|
||||||
@@ -181,6 +184,7 @@
|
|||||||
me.loginIn(res.data.token); //存储一个字符传值
|
me.loginIn(res.data.token); //存储一个字符传值
|
||||||
// 缓存用户的信息
|
// 缓存用户的信息
|
||||||
uni.setStorageSync('user_info',res.data);
|
uni.setStorageSync('user_info',res.data);
|
||||||
|
this.imService.disconnect()
|
||||||
if (res.data.member.has_labels) {
|
if (res.data.member.has_labels) {
|
||||||
uni.switchTab({
|
uni.switchTab({
|
||||||
url: '/pages/index/index'
|
url: '/pages/index/index'
|
||||||
|
|||||||
@@ -73,11 +73,11 @@ export default {
|
|||||||
width: 90%;
|
width: 90%;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
padding: 16upx 0;
|
padding: 16upx 0;
|
||||||
font-size: 26upx;
|
font-size: 30upx;
|
||||||
color: #333;
|
color: #333;
|
||||||
}
|
}
|
||||||
.rict_type {
|
.rict_type {
|
||||||
text-indent: 1rem;
|
text-indent: 1rem;
|
||||||
line-height: 1.2;
|
line-height: 1.4;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<view v-for="(item, index) in evalueList" :key="index" class="itme">
|
<view v-for="(item, index) in evalueList" :key="index" class="itme">
|
||||||
<comment :reply="true" :content="item"></comment>
|
<comment :reply="true" :content="item"></comment>
|
||||||
</view>
|
</view>
|
||||||
<u-empty text="暂无评论" mode="list" v-if="!evalueList.length" margin-top="120" color="#333"></u-empty>
|
<u-empty text="暂无评价" mode="list" v-if="!evalueList.length" margin-top="120" color="#333"></u-empty>
|
||||||
</view>
|
</view>
|
||||||
<!-- 加载更多 -->
|
<!-- 加载更多 -->
|
||||||
<u-loadmore :status="loadStatus" bgColor="#EEEBEE" margin-top="20" margin-bottom="20" v-if="evalueList.length >= 12"></u-loadmore>
|
<u-loadmore :status="loadStatus" bgColor="#EEEBEE" margin-top="20" margin-bottom="20" v-if="evalueList.length >= 12"></u-loadmore>
|
||||||
@@ -86,7 +86,7 @@ export default {
|
|||||||
this.evalueList = [];
|
this.evalueList = [];
|
||||||
}
|
}
|
||||||
return res.data.length;
|
return res.data.length;
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -31,12 +31,16 @@
|
|||||||
height: 60rpx;
|
height: 60rpx;
|
||||||
background-color: #ececec;
|
background-color: #ececec;
|
||||||
color: #999;
|
color: #999;
|
||||||
text-align: center;
|
// text-align: center;
|
||||||
line-height: 60rpx;
|
// line-height: 60rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
border-radius: 6rpx;
|
border-radius: 6rpx;
|
||||||
margin-right: 26rpx;
|
margin-right: 26rpx;
|
||||||
margin-bottom: 20rpx;
|
margin-bottom: 20rpx;
|
||||||
|
border: #ececec 1rpx solid;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
}
|
}
|
||||||
.xuanzhong{
|
.xuanzhong{
|
||||||
border: #ff780f 1rpx solid;
|
border: #ff780f 1rpx solid;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="userinfo" @click="stopClick()">
|
<view class="userinfo" @click="stopClick()">
|
||||||
<view class="userhead">
|
<view class="userhead">
|
||||||
<image class="avatar" :src="item.member_avatar"></image>
|
<image class="avatar" :src="item.member_avatar" @click="gotoInfo(item.role,item.member_id,item.store_id)"></image>
|
||||||
<!-- <text class="follow" @click="following(item.member_id)">{{ is_follow ? "✓" : "+" }}</text> -->
|
<!-- <text class="follow" @click="following(item.member_id)">{{ is_follow ? "✓" : "+" }}</text> -->
|
||||||
<image class="follow" :src=" !is_follow ? '../../static/image/userinfo/follow.png' : '../../static/image/userinfo/followed.png' " mode="" @click="following(item.member_id)"></image>
|
<image class="follow" :src=" !is_follow ? '../../static/image/userinfo/follow.png' : '../../static/image/userinfo/followed.png' " mode="" @click="following(item.member_id)"></image>
|
||||||
</view>
|
</view>
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
<text class="operat-span">{{ comment_num }}</text>
|
<text class="operat-span">{{ comment_num }}</text>
|
||||||
</view>
|
</view>
|
||||||
<!-- 购物车 -->
|
<!-- 购物车 -->
|
||||||
<view class="operat gouwu">
|
<view class="operat gouwu" v-if="cart_num">
|
||||||
<image class="operat-img" :src=" is_cart ? '../../static/image/userinfo/gouwuche1.png' : '../../static/image/userinfo/gouwuche.png' "
|
<image class="operat-img" :src=" is_cart ? '../../static/image/userinfo/gouwuche1.png' : '../../static/image/userinfo/gouwuche.png' "
|
||||||
mode="" @click="carting()"></image>
|
mode="" @click="carting()"></image>
|
||||||
</view>
|
</view>
|
||||||
@@ -64,7 +64,7 @@
|
|||||||
z-index: 100;
|
z-index: 100;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 80rpx;
|
top: 80rpx;
|
||||||
left: 30rpx;
|
left: 34rpx;
|
||||||
width: 50rpx;
|
width: 50rpx;
|
||||||
height: 50rpx;
|
height: 50rpx;
|
||||||
}
|
}
|
||||||
@@ -75,7 +75,7 @@
|
|||||||
/* #endif */
|
/* #endif */
|
||||||
align-items: center;
|
align-items: center;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
padding: 0 30rpx;
|
// padding: 0 30rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.operat-span {
|
.operat-span {
|
||||||
@@ -100,18 +100,20 @@
|
|||||||
is_collect: this.list.is_collect || false,
|
is_collect: this.list.is_collect || false,
|
||||||
is_content: false,
|
is_content: false,
|
||||||
is_cart: false,
|
is_cart: false,
|
||||||
|
cart_num: 0,
|
||||||
comment_num: this.list.comment_num || 0,
|
comment_num: this.list.comment_num || 0,
|
||||||
item: this.list || {}
|
item: this.list || {},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
list(newValue, old) {
|
list(newValue, old) {
|
||||||
// console.log(newValue);
|
// console.log(newValue.goods.length);
|
||||||
this.item = newValue || {};
|
this.item = newValue || {};
|
||||||
this.is_follow = this.list.is_attention || false;
|
this.is_follow = this.list.is_attention || false;
|
||||||
this.is_like = this.list.is_like || false;
|
this.is_like = this.list.is_like || false;
|
||||||
this.is_collect = this.list.is_collect || false;
|
this.is_collect = this.list.is_collect || false;
|
||||||
this.comment_num = this.list.comment_num || 0;
|
this.comment_num = this.list.comment_num || 0;
|
||||||
|
this.cart_num = newValue.goods.length;
|
||||||
},
|
},
|
||||||
cart(newValue, old) {
|
cart(newValue, old) {
|
||||||
// console.log(newValue);
|
// console.log(newValue);
|
||||||
@@ -132,7 +134,7 @@
|
|||||||
// 关注
|
// 关注
|
||||||
following(id) {
|
following(id) {
|
||||||
uni.request({
|
uni.request({
|
||||||
url: "https://dmmall.sdbairui.com/api/member/attentionMember",
|
url: "https://mall.dmygkeji.com/api/member/attentionMember",
|
||||||
method: "POST",
|
method: "POST",
|
||||||
data: {
|
data: {
|
||||||
member_id: id
|
member_id: id
|
||||||
@@ -161,7 +163,7 @@
|
|||||||
likeType(id) {
|
likeType(id) {
|
||||||
// console.log(id);
|
// console.log(id);
|
||||||
uni.request({
|
uni.request({
|
||||||
url: "https://dmmall.sdbairui.com/api/article/articleLike",
|
url: "https://mall.dmygkeji.com/api/article/articleLike",
|
||||||
method: "POST",
|
method: "POST",
|
||||||
data: {
|
data: {
|
||||||
article_id: id
|
article_id: id
|
||||||
@@ -192,7 +194,7 @@
|
|||||||
// 收藏
|
// 收藏
|
||||||
collecting(id) {
|
collecting(id) {
|
||||||
uni.request({
|
uni.request({
|
||||||
url: "https://dmmall.sdbairui.com/api/article/articleCollect",
|
url: "https://mall.dmygkeji.com/api/article/articleCollect",
|
||||||
method: "POST",
|
method: "POST",
|
||||||
data: {
|
data: {
|
||||||
article_id: id
|
article_id: id
|
||||||
@@ -238,6 +240,17 @@
|
|||||||
cart: this.is_cart
|
cart: this.is_cart
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
gotoInfo(type,id,s_id) {
|
||||||
|
if (type == 2) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pageC/merchant/index?id=" + s_id
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pageB/details/index?id=" + id
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
// 冒泡
|
// 冒泡
|
||||||
stopClick() {
|
stopClick() {
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,6 +45,7 @@
|
|||||||
<view>我们有万能穿搭公式</view>
|
<view>我们有万能穿搭公式</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<u-toast ref="uToast" />
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
@@ -60,8 +61,14 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
exchangeCoupon() {
|
exchangeCoupon() {
|
||||||
this.$u.api.getCoupon({ id: 1 }).then(res => {
|
this.$u.api.getCoupon({ id: 1 }).then(res => {
|
||||||
|
if(res.errCode == 0) {
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
title: res.message,
|
||||||
|
url: '/pageE/tool/MineCoupon'
|
||||||
|
})
|
||||||
|
} else {
|
||||||
this.$u.toast(res.message);
|
this.$u.toast(res.message);
|
||||||
if(res.errCode == 0) {}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,7 +19,8 @@
|
|||||||
<view class="box">
|
<view class="box">
|
||||||
<videoItem v-for="item in listInfo" :key="item.article_id" :item="item"
|
<videoItem v-for="item in listInfo" :key="item.article_id" :item="item"
|
||||||
@getArticlelist="getArticlelist"></videoItem>
|
@getArticlelist="getArticlelist"></videoItem>
|
||||||
<view class="no-data" v-show="!listInfo && page">暂无数据</view>
|
<view class="no-data" v-if="!listInfo && page">暂无数据</view>
|
||||||
|
<u-loadmore v-else class="load-size" color="#999999" :status="status" icon-type="iconType" margin-top="50" margin-bottom="50" :load-text="loadText" />
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</view>
|
</view>
|
||||||
@@ -75,6 +76,13 @@ export default {
|
|||||||
listInfo: [], // 列表详情
|
listInfo: [], // 列表详情
|
||||||
member_id: 0,
|
member_id: 0,
|
||||||
page: 1,
|
page: 1,
|
||||||
|
status: 'loadmore',
|
||||||
|
iconType: 'circle',
|
||||||
|
loadText: {
|
||||||
|
loadmore: '轻轻上拉',
|
||||||
|
loading: '努力加载中',
|
||||||
|
nomore: '实在没有了'
|
||||||
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
@@ -84,6 +92,10 @@ export default {
|
|||||||
this.getArticlelist();
|
this.getArticlelist();
|
||||||
|
|
||||||
},
|
},
|
||||||
|
onReachBottom() {
|
||||||
|
// this.page++;
|
||||||
|
this.getArticlelist();
|
||||||
|
},
|
||||||
methods:{
|
methods:{
|
||||||
// 获取信息
|
// 获取信息
|
||||||
getUserInfo(id) {
|
getUserInfo(id) {
|
||||||
@@ -107,13 +119,23 @@ export default {
|
|||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res.errCode == 0) {
|
if (res.errCode == 0) {
|
||||||
// console.log(res);
|
// console.log(res);
|
||||||
this.listInfo = res.data.list;
|
// this.listInfo = res.data.list;
|
||||||
// console.log(this.listInfo);
|
// console.log(this.listInfo);
|
||||||
|
if (this.page == 1) {
|
||||||
|
this.listInfo = res.data.list;
|
||||||
|
this.status = "loadmore";
|
||||||
|
} else if (res.data.length == 0) {
|
||||||
|
this.status = "nomore";
|
||||||
|
} else {
|
||||||
|
this.listInfo = this.listInfo.concat(res.data.list);
|
||||||
|
}
|
||||||
|
this.page++;
|
||||||
} else {
|
} else {
|
||||||
console.log(res.message);
|
console.log(res.message);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
dianji(a){
|
dianji(a){
|
||||||
console.log(a);
|
console.log(a);
|
||||||
if(typeof a == "object"){
|
if(typeof a == "object"){
|
||||||
@@ -121,8 +143,14 @@ export default {
|
|||||||
}else{
|
}else{
|
||||||
this.num = a
|
this.num = a
|
||||||
}
|
}
|
||||||
|
if (a == 0) {
|
||||||
|
this.page = 1;
|
||||||
|
this.getArticlelist();
|
||||||
|
} else if (a == 1) {
|
||||||
|
this.page = 1;
|
||||||
this.getArticlelist();
|
this.getArticlelist();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
@@ -24,8 +24,8 @@
|
|||||||
<!-- 用户操作 -->
|
<!-- 用户操作 -->
|
||||||
<userinfo class="userinfo" :list="list" :cart="cart_type" :comment="is_comment" :num="comment_num" @openCart="openPopup"></userinfo>
|
<userinfo class="userinfo" :list="list" :cart="cart_type" :comment="is_comment" :num="comment_num" @openCart="openPopup"></userinfo>
|
||||||
<!-- 评论 -->
|
<!-- 评论 -->
|
||||||
<u-popup v-model="is_comment" class="pl" mode="bottom" border-radius="10" height="700rpx">
|
<u-popup v-model="is_comment" class="pl" mode="bottom" border-radius="10" @touchmove.stop.prevent="moveHandle">
|
||||||
<view class="top">
|
<view class="comment-top">
|
||||||
<text>评论</text>
|
<text>评论</text>
|
||||||
<u-icon name="close" color="#333" size="28" @click="is_comment=false"></u-icon>
|
<u-icon name="close" color="#333" size="28" @click="is_comment=false"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
@@ -52,7 +52,10 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="child_content">{{ child.content }}</view>
|
<view class="child_content">{{ child.content }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="more-reply" v-if="item.reply_count" @click="getReplyList(item.id)">展开更多回复<u-icon name="arrow-down"></u-icon></view>
|
<view class="more-reply" v-if="item.reply_count" @click="getReplyList(item.id)">
|
||||||
|
{{ child_end[item.id] ? "暂无更多回复" : "展开更多回复" }}
|
||||||
|
<u-icon name="arrow-down" v-if="!child_end[item.id]"></u-icon>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
<view class="no-data" v-if="!commentList.length">还没有评论,快来评论吧!</view>
|
<view class="no-data" v-if="!commentList.length">还没有评论,快来评论吧!</view>
|
||||||
@@ -80,7 +83,8 @@
|
|||||||
<view v-for="(item,index) in list.goods" :key="index" class="item" @click="gotoInfo(item.goods_id)">
|
<view v-for="(item,index) in list.goods" :key="index" class="item" @click="gotoInfo(item.goods_id)">
|
||||||
<image :src="item.goods_image" mode="aspectFill"></image>
|
<image :src="item.goods_image" mode="aspectFill"></image>
|
||||||
<view>
|
<view>
|
||||||
<text class="title">{{ item.goods_advword }}</text>
|
<text class="cart-title u-line-1">{{ item.goods_advword }}</text>
|
||||||
|
<text class="cart-info u-line-2">{{ item.goods_name }}</text>
|
||||||
<text class="price">{{ item.goods_promotion_price }}</text>
|
<text class="price">{{ item.goods_promotion_price }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -158,27 +162,32 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
.label {
|
.label {
|
||||||
padding: 6rpx 10rpx;
|
height: 40rpx;
|
||||||
margin: 0 10rpx 10rpx 0;
|
padding: 4rpx 14rpx;
|
||||||
font-size: 24rpx;
|
margin-right: 10rpx;
|
||||||
|
margin-bottom: 10rpx;
|
||||||
|
font-size: 26rpx;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 38rpx;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
border-radius: 6rpx;
|
border-radius: 10rpx;
|
||||||
background-color: #000000;
|
background-color: rgba(0, 0, 0, .6);
|
||||||
opacity: 0.5;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.userinfo{
|
.userinfo{
|
||||||
|
z-index: 9999;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 30rpx;
|
right: 30rpx;
|
||||||
top: 50%;
|
top: 50%;
|
||||||
transform: translateY(-285rpx);
|
transform: translateY(-285rpx);
|
||||||
}
|
}
|
||||||
.pl {
|
.pl {
|
||||||
.top {
|
.comment-top {
|
||||||
z-index: 1000;
|
z-index: 1000;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 0;
|
top: 0;
|
||||||
|
left: 0;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
@@ -196,7 +205,7 @@
|
|||||||
.scroll-box {
|
.scroll-box {
|
||||||
z-index: 99;
|
z-index: 99;
|
||||||
margin: 88rpx 0 100rpx 0;
|
margin: 88rpx 0 100rpx 0;
|
||||||
height: 100%;
|
height: 600rpx;
|
||||||
.box {
|
.box {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -216,6 +225,7 @@
|
|||||||
height: 60rpx;
|
height: 60rpx;
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
color: #333;
|
color: #333;
|
||||||
|
pointer-events: none;
|
||||||
.time {
|
.time {
|
||||||
font-size: 22rpx;
|
font-size: 22rpx;
|
||||||
color: #999;
|
color: #999;
|
||||||
@@ -228,10 +238,13 @@
|
|||||||
}
|
}
|
||||||
.content {
|
.content {
|
||||||
padding: 0 20rpx 10rpx 90rpx;
|
padding: 0 20rpx 10rpx 90rpx;
|
||||||
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
.child-content {
|
.child-content {
|
||||||
margin: 6rpx 90rpx 6rpx;
|
margin: 6rpx 90rpx 6rpx;
|
||||||
|
// pointer-events: none;
|
||||||
.child-box {
|
.child-box {
|
||||||
|
pointer-events: none;
|
||||||
.info {
|
.info {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -332,9 +345,16 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: space-around;
|
justify-content: space-around;
|
||||||
color: #333;
|
width: 500rpx;
|
||||||
|
color: #343434;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
.title {
|
.cart-title {
|
||||||
|
line-height: 40rpx;
|
||||||
|
font-size: 29rpx;
|
||||||
|
}
|
||||||
|
.cart-info {
|
||||||
|
font-size: 24rpx;
|
||||||
|
line-height: 1.2;
|
||||||
}
|
}
|
||||||
.name {
|
.name {
|
||||||
width: 500rpx;
|
width: 500rpx;
|
||||||
@@ -345,6 +365,8 @@
|
|||||||
display: -webkit-box;
|
display: -webkit-box;
|
||||||
-webkit-box-orient: vertical;
|
-webkit-box-orient: vertical;
|
||||||
-webkit-line-clamp: 2;
|
-webkit-line-clamp: 2;
|
||||||
|
margin:8rpx 0;
|
||||||
|
line-height:36rpx;
|
||||||
}
|
}
|
||||||
.price {
|
.price {
|
||||||
color: #FF3131;
|
color: #FF3131;
|
||||||
@@ -423,6 +445,7 @@ export default {
|
|||||||
edit_text_other: "有爱评论,说点好听的 ~",
|
edit_text_other: "有爱评论,说点好听的 ~",
|
||||||
commentList: [], // 评论
|
commentList: [], // 评论
|
||||||
allList: {}, // 全部子评论
|
allList: {}, // 全部子评论
|
||||||
|
child_end: {},
|
||||||
status: 'loadmore',
|
status: 'loadmore',
|
||||||
iconType: 'circle',
|
iconType: 'circle',
|
||||||
loadText: {
|
loadText: {
|
||||||
@@ -500,6 +523,8 @@ export default {
|
|||||||
// console.log(item);
|
// console.log(item);
|
||||||
item.page = 0;
|
item.page = 0;
|
||||||
item.commentList = [];
|
item.commentList = [];
|
||||||
|
this.page_[item.id] = 0;
|
||||||
|
this.child_end[item.id] = false;
|
||||||
})
|
})
|
||||||
this.commentList = list;
|
this.commentList = list;
|
||||||
}
|
}
|
||||||
@@ -553,14 +578,14 @@ export default {
|
|||||||
// console.log(p_id);
|
// console.log(p_id);
|
||||||
if (res.data.data.pid) {
|
if (res.data.data.pid) {
|
||||||
this.commentList[this.comment_id].reply_count = true;
|
this.commentList[this.comment_id].reply_count = true;
|
||||||
console.log(this.allList[p_id]);
|
// console.log(this.allList[p_id]);
|
||||||
if (this.allList[p_id]) {
|
if (this.allList[p_id]) {
|
||||||
this.allList[p_id].push(res.data.data);
|
this.allList[p_id].push(res.data.data);
|
||||||
} else {
|
} else {
|
||||||
this.allList[p_id] = [];
|
this.allList[p_id] = [];
|
||||||
this.allList[p_id].push(res.data.data);
|
this.allList[p_id].push(res.data.data);
|
||||||
}
|
}
|
||||||
console.log(this.allList);
|
// console.log(this.allList);
|
||||||
} else {
|
} else {
|
||||||
this.commentList.unshift(res.data.data);
|
this.commentList.unshift(res.data.data);
|
||||||
}
|
}
|
||||||
@@ -574,18 +599,20 @@ export default {
|
|||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: "loading..."
|
title: "loading..."
|
||||||
})
|
})
|
||||||
if (!this.page_[id] === 0) {
|
|
||||||
}
|
|
||||||
this.$u.post("article/articleReplyList", {id: id, page: this.page_[id]}).then(res => {
|
this.$u.post("article/articleReplyList", {id: id, page: this.page_[id]}).then(res => {
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
if (res.errCode == 0) {
|
if (res.errCode == 0) {
|
||||||
// if (res.data.length < 10) {
|
if (this.page_[id] == 0) {
|
||||||
// this.is_more = false;
|
|
||||||
// }
|
|
||||||
this.page_[id]++;
|
|
||||||
this.allList[id] = res.data;
|
this.allList[id] = res.data;
|
||||||
|
} else {
|
||||||
|
this.allList[id] = this.allList[id].concat(res.data);
|
||||||
|
}
|
||||||
|
this.page_[id]++;
|
||||||
|
this.$forceUpdate();
|
||||||
|
// console.log(this.allList);
|
||||||
|
} else if (res.errCode == 1) {
|
||||||
|
this.child_end[id] = true;
|
||||||
this.$forceUpdate();
|
this.$forceUpdate();
|
||||||
console.log(this.allList);
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -602,6 +629,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// 评论滚动到底部
|
// 评论滚动到底部
|
||||||
scrollBottom(e) {
|
scrollBottom(e) {
|
||||||
|
console.log(1);
|
||||||
this.getComment();
|
this.getComment();
|
||||||
},
|
},
|
||||||
// 跳转到商品
|
// 跳转到商品
|
||||||
@@ -611,6 +639,11 @@ export default {
|
|||||||
url: "/pageB/sdetails/index?id=" + id + "&type=" + 1,
|
url: "/pageB/sdetails/index?id=" + id + "&type=" + 1,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 禁止滚动
|
||||||
|
moveHandle(e) {
|
||||||
|
console.log(e);
|
||||||
|
return;
|
||||||
|
},
|
||||||
goBack() {
|
goBack() {
|
||||||
uni.navigateBack({
|
uni.navigateBack({
|
||||||
delta: 1
|
delta: 1
|
||||||
|
|||||||
44
pageB/playVideo/index.nvue
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
<template>
|
||||||
|
<view style="width:750rpx" :style="{'height':height}">
|
||||||
|
<image @click="calose()" style="width:30rpx;height:30rpx;position: fixed;top:80rpx;right:30rpx;" src="/static/image/clons.png"></image>
|
||||||
|
<video :src="url" class="video" :style="{'padding-top':top,'height': width}" :autoplay="true"></video>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
<style>
|
||||||
|
.video{
|
||||||
|
width: 750rpx;
|
||||||
|
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name:"video",
|
||||||
|
data(){
|
||||||
|
return {
|
||||||
|
url:"",
|
||||||
|
top:0,
|
||||||
|
height:0,
|
||||||
|
width:0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad(a){
|
||||||
|
const res = uni.getSystemInfoSync();
|
||||||
|
let height = res.windowHeight
|
||||||
|
let width = res.windowWidth
|
||||||
|
this.width = width + ( (height - width) / 2) + 'px'
|
||||||
|
console.log(this.width)
|
||||||
|
this.top = (height - width) / 2+ 'px'
|
||||||
|
console.log(this.top)
|
||||||
|
this.height = height + 'px';
|
||||||
|
console.log(a)
|
||||||
|
this.url = a.url
|
||||||
|
},
|
||||||
|
methods:{
|
||||||
|
calose(){
|
||||||
|
uni.navigateBack({
|
||||||
|
delta: 1
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
@@ -29,6 +29,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="pic" v-else-if="type == 1">
|
<view class="pic" v-else-if="type == 1">
|
||||||
<text>¥{{ goodsInfo.goods_price || '0.00' }}</text>
|
<text>¥{{ goodsInfo.goods_price || '0.00' }}</text>
|
||||||
|
<s>¥{{ goodsInfo.goods_marketprice || '0.00' }}</s>
|
||||||
</view>
|
</view>
|
||||||
<view class="collect" @click="switchCollect(goodsInfo.is_collect)">
|
<view class="collect" @click="switchCollect(goodsInfo.is_collect)">
|
||||||
<u-icon name="star-fill" color="#FF7807" size="28" v-if="goodsInfo.is_collect == 1"></u-icon>
|
<u-icon name="star-fill" color="#FF7807" size="28" v-if="goodsInfo.is_collect == 1"></u-icon>
|
||||||
@@ -120,6 +121,11 @@
|
|||||||
<view class="heng"></view>
|
<view class="heng"></view>
|
||||||
</view>
|
</view>
|
||||||
<view class="rich">
|
<view class="rich">
|
||||||
|
<view class="goods-video" v-if="list.length && goodsInfo.video" @click="playVideo">
|
||||||
|
<image class="video-play" src="/static/videoPlay.png"></image>
|
||||||
|
<view class="blacks"></view>
|
||||||
|
<image class="video-img" :src="list[0].image" mode="aspectFill"></image>
|
||||||
|
</view>
|
||||||
<rich-text :nodes="goodsInfo.mobile_body"></rich-text>
|
<rich-text :nodes="goodsInfo.mobile_body"></rich-text>
|
||||||
</view>
|
</view>
|
||||||
<!-- 选择规格数量 -->
|
<!-- 选择规格数量 -->
|
||||||
@@ -129,7 +135,7 @@
|
|||||||
<view class="head">
|
<view class="head">
|
||||||
<image class="image" :src="goodsInfo.goods_image"></image>
|
<image class="image" :src="goodsInfo.goods_image"></image>
|
||||||
<view class="info">
|
<view class="info">
|
||||||
<text class="u-line-2">{{goodsInfo.goods_name}}</text>
|
<view class="goods-name u-line-2">{{goodsInfo.goods_name}}</view>
|
||||||
<text v-if="type == 1">¥{{ goodsInfo.goods_price }}</text>
|
<text v-if="type == 1">¥{{ goodsInfo.goods_price }}</text>
|
||||||
<text v-else-if="type == 2">¥{{ goodsInfo.pintuan_price }}</text>
|
<text v-else-if="type == 2">¥{{ goodsInfo.pintuan_price }}</text>
|
||||||
<text v-else-if="type == 3">¥{{ groupbuyInfo.groupbuy_price }}</text>
|
<text v-else-if="type == 3">¥{{ groupbuyInfo.groupbuy_price }}</text>
|
||||||
@@ -424,7 +430,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// 拼团详情
|
// 拼团详情
|
||||||
pinTuanDetails() {
|
pinTuanDetails() {
|
||||||
console.log(this.id);
|
// console.log(this.id);
|
||||||
this.$u.api.getPinTuanDetails({
|
this.$u.api.getPinTuanDetails({
|
||||||
pintuan_id: this.pintuan_id,
|
pintuan_id: this.pintuan_id,
|
||||||
goods_id: this.id,
|
goods_id: this.id,
|
||||||
@@ -675,6 +681,12 @@ export default {
|
|||||||
id: id
|
id: id
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
playVideo() {
|
||||||
|
console.log(this.goodsInfo.video);
|
||||||
|
this.$u.route('/pageB/playVideo/index', {
|
||||||
|
url: this.goodsInfo.video
|
||||||
|
});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@@ -1084,6 +1096,30 @@ export default {
|
|||||||
}
|
}
|
||||||
.rich {
|
.rich {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
.goods-video {
|
||||||
|
position: relative;
|
||||||
|
.video-img {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.blacks {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
background-color: rgba(0, 0, 0, 0.35);
|
||||||
|
z-index: 8;
|
||||||
|
}
|
||||||
|
.video-play {
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
left: 50%;
|
||||||
|
transform: translate(-50%, -50%);
|
||||||
|
width: 100rpx;
|
||||||
|
height: 100rpx;
|
||||||
|
z-index: 9;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.group-tool {
|
.group-tool {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
@@ -1157,7 +1193,7 @@ export default {
|
|||||||
height: 98rpx;
|
height: 98rpx;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
bottom:0;
|
bottom:0;
|
||||||
border-top: 1rpx solid #ececec;
|
// border-top: 1rpx solid #ececec;
|
||||||
z-index: 10076;
|
z-index: 10076;
|
||||||
.navs{
|
.navs{
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -1206,7 +1242,9 @@ export default {
|
|||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
margin-left: 27rpx;
|
margin-left: 27rpx;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
>text:first-child{
|
.goods-name {
|
||||||
|
height: 76rpx;
|
||||||
|
line-height: 38rpx;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #333;
|
color: #333;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,7 +17,9 @@
|
|||||||
<view class="right">
|
<view class="right">
|
||||||
<view class="name u-line-1">{{ goods.goods_name }}</view>
|
<view class="name u-line-1">{{ goods.goods_name }}</view>
|
||||||
<view class="briefing u-line-1">{{ goods.goods_advword }}</view>
|
<view class="briefing u-line-1">{{ goods.goods_advword }}</view>
|
||||||
<view class="price">¥{{ goods.goods_price }}</view>
|
<view class="price">¥{{ goods.goods_price }}
|
||||||
|
<text style="font-size:22rpx;color:#999;text-decoration:line-through;display: inline-block;margin-left:20rpx"> ¥{{goods.goods_marketprice}}</text>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<u-loadmore :status="loadStatus" bgColor="#FFFFFF" margin-top="20" margin-bottom="20" v-if="goodsList.length >= pageSize"></u-loadmore>
|
<u-loadmore :status="loadStatus" bgColor="#FFFFFF" margin-top="20" margin-bottom="20" v-if="goodsList.length >= pageSize"></u-loadmore>
|
||||||
@@ -122,6 +124,7 @@ export default {
|
|||||||
if(load == 'reload') this.goodsList = res.data.data;
|
if(load == 'reload') this.goodsList = res.data.data;
|
||||||
else if(load == 'loadmore') this.goodsList.push(...res.data.data);
|
else if(load == 'loadmore') this.goodsList.push(...res.data.data);
|
||||||
}
|
}
|
||||||
|
console.log(res)
|
||||||
return res.data.data.length;
|
return res.data.data.length;
|
||||||
},
|
},
|
||||||
loadMore() {
|
loadMore() {
|
||||||
@@ -164,6 +167,7 @@ export default {
|
|||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
||||||
.classify-goods {
|
.classify-goods {
|
||||||
.tab-container {
|
.tab-container {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
|||||||
@@ -1,28 +1,28 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="container">
|
<view class="container">
|
||||||
<video id="videoId" :style="videoSize" :src="src" autoplay="true" :show-fullscreen-btn="false" @play="playing"
|
<video id="videoId" :style="videoSize" :src="src" autoplay="true" :show-fullscreen-btn="false" @play="playing"
|
||||||
@pause="pausing" @ended="videoEnd" @timeupdate="timeupdate" :show-play-btn="false" controls="false" @click="stoping"
|
@pause="pausing" @ended="videoEnd" @timeupdate="timeupdate" :show-play-btn="false" :controls="false" @click="stoping"
|
||||||
:enable-progress-gesture="false" :show-center-play-btn="false"></video>
|
:enable-progress-gesture="false" :show-center-play-btn="false"></video>
|
||||||
<!-- 用户操作 -->
|
<!-- 用户操作 -->
|
||||||
<userinfo class="user-info" :style="{ top: fixTop }" :list="list" :cart="cart_type" :comment="is_comment" :num="comment_num"
|
<userinfo class="user-info" :style="{ top: fixTop }" :list="list" :cart="cart_type" :comment="is_comment" :num="comment_num"
|
||||||
@openCart="openPopup"></userinfo>
|
@openCart="openPopup"></userinfo>
|
||||||
<!-- 视频信息 -->
|
<!-- 视频信息 -->
|
||||||
<cover-view class="info-box" @click="stopClick">
|
<cover-view class="info-box">
|
||||||
<view class="video-info-box" :style="{ width: time_count > 99 ? '180rpx' : '160rpx' }">
|
<view class="video-info-box" :style="{ width: time_count > 99 ? '180rpx' : '160rpx' }">
|
||||||
<image class="image-play" src="../../static/videoIcon.png" mode=""></image>
|
<image class="image-play" src="../../static/videoIcon.png" mode=""></image>
|
||||||
<text class="video-slip">视频</text>
|
<text class="video-slip">视频</text>
|
||||||
<text class="time">{{ time_count }}s</text>
|
<text class="time">{{ time_count }}s</text>
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
<text class="name">@{{ list.member_nickname }}</text>
|
<text class="name" @click="gotoInfo(list)">@{{ list.member_nickname }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view @click="stopClick">
|
||||||
<text class="title">{{ list.article_title }}</text>
|
<text class="title">{{ list.article_title }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view @click="stopClick">
|
||||||
<text class="centent">{{ list.article_content }}</text>
|
<text class="centent">{{ list.article_content }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="label-box">
|
<view class="label-box" @click="stopClick">
|
||||||
<block v-for="(item,index) in list.label" :key="index">
|
<block v-for="(item,index) in list.label" :key="index">
|
||||||
<text class="label" :style="{ width: labelLen[index] * 40 + 'rpx' }">{{ item.name }}</text>
|
<text class="label" :style="{ width: labelLen[index] * 40 + 'rpx' }">{{ item.name }}</text>
|
||||||
</block>
|
</block>
|
||||||
@@ -52,7 +52,7 @@
|
|||||||
<view class="comment-list-box">
|
<view class="comment-list-box">
|
||||||
<view class="comment-list-header">
|
<view class="comment-list-header">
|
||||||
<image class="avatar" :src="item.member_avatar" mode=""></image>
|
<image class="avatar" :src="item.member_avatar" mode=""></image>
|
||||||
<view>
|
<view class="comment-title-info">
|
||||||
<text class="comment-title">{{ item.member_nickname }}</text>
|
<text class="comment-title">{{ item.member_nickname }}</text>
|
||||||
<text class="comment-time">{{ item.create_time }}</text>
|
<text class="comment-time">{{ item.create_time }}</text>
|
||||||
</view>
|
</view>
|
||||||
@@ -71,10 +71,11 @@
|
|||||||
</view>
|
</view>
|
||||||
<text class="child_content">{{ child.content }}</text>
|
<text class="child_content">{{ child.content }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<!-- <view> -->
|
||||||
<text class="more-comment" @click="getReplyList(item.id)" v-if="item.reply_count">展开更多回复</text>
|
<text class="more-comment" @click="getReplyList(item.id)" v-if="item.reply_count">
|
||||||
<text></text>
|
{{ child_end[item.id] ? "暂无更多回复" : "展开更多回复" }}
|
||||||
</view>
|
</text>
|
||||||
|
<!-- </view> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="send-box" @click="openKeyInput">
|
<view class="send-box" @click="openKeyInput">
|
||||||
@@ -109,6 +110,7 @@
|
|||||||
<image class="goods-img" :src="item.goods_image" mode=""></image>
|
<image class="goods-img" :src="item.goods_image" mode=""></image>
|
||||||
<view class="goods-info">
|
<view class="goods-info">
|
||||||
<text class="good-title">{{ item.goods_advword }}</text>
|
<text class="good-title">{{ item.goods_advword }}</text>
|
||||||
|
<text class="good-name">{{ item.goods_name }}</text>
|
||||||
<text class="good-price">{{ item.goods_promotion_price }}</text>
|
<text class="good-price">{{ item.goods_promotion_price }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -133,7 +135,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import userinfo from "../components/userinfo/index" // 点赞组件
|
import userinfo from "../components/userinfo/index" // 点赞组件
|
||||||
const temp_url = "https://dmmall.sdbairui.com/api/";
|
const temp_url = "https://mall.dmygkeji.com/api/";
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
userinfo
|
userinfo
|
||||||
@@ -166,6 +168,7 @@
|
|||||||
time_count: 0,
|
time_count: 0,
|
||||||
linear: null,
|
linear: null,
|
||||||
loadinging: false,
|
loadinging: false,
|
||||||
|
child_end: {},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
@@ -177,6 +180,13 @@
|
|||||||
onReady() {
|
onReady() {
|
||||||
this.videoBox = uni.createVideoContext("videoId", this);
|
this.videoBox = uni.createVideoContext("videoId", this);
|
||||||
},
|
},
|
||||||
|
onHide() {
|
||||||
|
if (uni.getSystemInfoSync().platform == "ios") {
|
||||||
|
console.log("ios");
|
||||||
|
} else if (uni.getSystemInfoSync().platform == "android") {
|
||||||
|
this.videoBox.pause();
|
||||||
|
}
|
||||||
|
},
|
||||||
onBackPress() {
|
onBackPress() {
|
||||||
if (this.cart_type) {
|
if (this.cart_type) {
|
||||||
this.cart_type = !this.cart_type;
|
this.cart_type = !this.cart_type;
|
||||||
@@ -238,6 +248,16 @@
|
|||||||
// console.log(res.data);
|
// console.log(res.data);
|
||||||
this.commentList = res.data.data;
|
this.commentList = res.data.data;
|
||||||
}
|
}
|
||||||
|
let list = this.commentList;
|
||||||
|
list.forEach((item,index) => {
|
||||||
|
console.log(item);
|
||||||
|
item.page = 0;
|
||||||
|
item.commentList = [];
|
||||||
|
this.page_[item.id] = 0;
|
||||||
|
this.child_end[item.id] = false;
|
||||||
|
})
|
||||||
|
console.log(list);
|
||||||
|
this.commentList = list;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -309,8 +329,6 @@
|
|||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: "loading..."
|
title: "loading..."
|
||||||
})
|
})
|
||||||
if (!this.page_[id] === 0) {}
|
|
||||||
console.log(id);
|
|
||||||
uni.request({
|
uni.request({
|
||||||
url: temp_url + "article/articleReplyList",
|
url: temp_url + "article/articleReplyList",
|
||||||
method: "POST",
|
method: "POST",
|
||||||
@@ -323,16 +341,20 @@
|
|||||||
},
|
},
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
|
console.log(this.page_);
|
||||||
if (res.data.errCode == 0) {
|
if (res.data.errCode == 0) {
|
||||||
if (res.data.data.length < 10) {
|
if (this.page_[id] == 0) {
|
||||||
this.is_more = false;
|
this.allList[id] = res.data.data;
|
||||||
|
} else {
|
||||||
|
this.allList[id] = this.allList[id].concat(res.data.data);
|
||||||
}
|
}
|
||||||
this.page_[id]++;
|
this.page_[id]++;
|
||||||
this.allList[id] = res.data.data;
|
|
||||||
this.$forceUpdate();
|
this.$forceUpdate();
|
||||||
// console.log(this.page_[id]);
|
} else if (res.data.errCode == 1) {
|
||||||
// console.log(this.allList);
|
this.child_end[id] = true;
|
||||||
|
this.$forceUpdate();
|
||||||
}
|
}
|
||||||
|
console.log(this.allList);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -344,11 +366,7 @@
|
|||||||
width: "750rpx",
|
width: "750rpx",
|
||||||
height: res.screenHeight + "px",
|
height: res.screenHeight + "px",
|
||||||
}
|
}
|
||||||
this.fixTop = "400rpx";
|
|
||||||
this.fixTop = res.screenHeight / 3;
|
this.fixTop = res.screenHeight / 3;
|
||||||
// #ifdef H5
|
|
||||||
this.fixTop = 400 + 'rpx'
|
|
||||||
// #endif
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -460,6 +478,9 @@
|
|||||||
url: "/pageB/sdetails/index?id=" + id + "&type=" + 1,
|
url: "/pageB/sdetails/index?id=" + id + "&type=" + 1,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
gotoInfo(id) {
|
||||||
|
console.log(id);
|
||||||
|
},
|
||||||
// 收起键盘
|
// 收起键盘
|
||||||
hideEdit() {},
|
hideEdit() {},
|
||||||
// stop
|
// stop
|
||||||
@@ -476,8 +497,10 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
|
||||||
.container {
|
.container {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
background-color: #FF0000 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 关闭 */
|
/* 关闭 */
|
||||||
@@ -497,6 +520,9 @@
|
|||||||
left: 330rpx;
|
left: 330rpx;
|
||||||
width: 100rpx;
|
width: 100rpx;
|
||||||
height: 100rpx;
|
height: 100rpx;
|
||||||
|
/* #ifdef H5 */
|
||||||
|
top: 500rpx;
|
||||||
|
/* #endif */
|
||||||
}
|
}
|
||||||
|
|
||||||
.pause-img {
|
.pause-img {
|
||||||
@@ -507,7 +533,10 @@
|
|||||||
/* 用户操作 */
|
/* 用户操作 */
|
||||||
.user-info {
|
.user-info {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
right: 30rpx;
|
right: 26rpx;
|
||||||
|
/* #ifdef H5 */
|
||||||
|
top: 400rpx;
|
||||||
|
/* #endif */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 底部信息 */
|
/* 底部信息 */
|
||||||
@@ -648,14 +677,17 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.child_content {
|
.child_content {
|
||||||
padding: 4rpx 0;
|
width: 550rpx;
|
||||||
|
padding-top: 6rpx;
|
||||||
margin-left: 40rpx;
|
margin-left: 40rpx;
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.more-comment {
|
.more-comment {
|
||||||
margin: 10rpx 0;
|
width: 150rpx;
|
||||||
|
height: 40rpx;
|
||||||
font-size: 22rpx;
|
font-size: 22rpx;
|
||||||
|
line-height: 4;
|
||||||
color: #999;
|
color: #999;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -670,6 +702,10 @@
|
|||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.comment-title-info {
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
|
||||||
.comment-title {
|
.comment-title {
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
color: #333;
|
color: #333;
|
||||||
@@ -710,6 +746,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.btn-send {
|
.btn-send {
|
||||||
|
padding: 0 20rpx;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #666;
|
color: #666;
|
||||||
}
|
}
|
||||||
@@ -806,6 +843,14 @@
|
|||||||
width: 500rpx;
|
width: 500rpx;
|
||||||
color: #333;
|
color: #333;
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
|
lines: 1;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
|
||||||
|
.good-name {
|
||||||
|
width: 500rpx;
|
||||||
|
font-size: 24rpx;
|
||||||
|
line-height: 30rpx;
|
||||||
lines: 2;
|
lines: 2;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
}
|
}
|
||||||
@@ -839,13 +884,16 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
|
width: 700rpx;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
font-size: 26rpx;
|
font-size: 30rpx;
|
||||||
margin-bottom: 20rpx;
|
margin-bottom: 20rpx;
|
||||||
|
lines: 1;
|
||||||
|
text-overflow: ellipsis;
|
||||||
}
|
}
|
||||||
|
|
||||||
.centent {
|
.centent {
|
||||||
width: 500rpx;
|
width: 700rpx;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
margin-bottom: 20rpx;
|
margin-bottom: 20rpx;
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
<view class="info">
|
<view class="info">
|
||||||
<view class="name u-line-2">{{ goods.goods_name }}</view>
|
<view class="name u-line-2">{{ goods.goods_name }}</view>
|
||||||
<view class="cart-info">
|
<view class="cart-info">
|
||||||
<view class="price">¥{{ goods.goods_total }}</view>
|
<view class="price">¥{{ goods.goods_price }}</view>
|
||||||
<view>×{{ goods.goods_num }}</view>
|
<view>×{{ goods.goods_num }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -67,17 +67,17 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<u-popup v-model="couponStatus" mode="bottom">
|
<u-popup v-model="couponStatus" mode="bottom">
|
||||||
<scroll-view class="coupon-choose" scroll-y style="height: 800rpx;" v-if="this.couponType.type == 1">
|
<scroll-view class="coupon-choose" scroll-y style="height: 50vh;" v-if="this.couponType.type == 1">
|
||||||
<view class="title">优惠券详情</view>
|
<view class="title">优惠券详情</view>
|
||||||
<view class="text">平台优惠券</view>
|
<view class="text">平台优惠券</view>
|
||||||
<Coupon :couponInfo="coupon" @use="useCoupon($event)" :goodsClass="goodsClass" v-for="(coupon, index) in orderInfo.store_voucher_all_list" :key="index"></Coupon>
|
<Coupon :couponInfo="coupon" @use="useCoupon($event)" :goodsClass="goodsClass" v-for="(coupon, index) in orderInfo.store_voucher_all_list" :key="index"></Coupon>
|
||||||
<u-empty text="无可用优惠券" mode="coupon" v-if="!orderInfo.store_voucher_all_list.length"></u-empty>
|
<u-empty text="无可用优惠券" mode="coupon" v-if="!orderInfo.store_voucher_all_list.length" style="height: 200rpx"></u-empty>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
<scroll-view class="coupon-choose" scroll-y style="height: 800rpx;" v-if="this.couponType.type == 2">
|
<scroll-view class="coupon-choose" scroll-y style="height: 50vh;" v-if="this.couponType.type == 2">
|
||||||
<view class="title">优惠券详情</view>
|
<view class="title">优惠券详情</view>
|
||||||
<view class="text">店铺优惠券</view>
|
<view class="text">店铺优惠券</view>
|
||||||
<Coupon :couponInfo="coupon" @use="useCoupon($event)" :goodsClass="goodsClass" v-for="(coupon, index) in orderInfo.store_voucher_list[this.couponType.store_id]" :key="index"></Coupon>
|
<Coupon :couponInfo="coupon" @use="useCoupon($event)" :goodsClass="goodsClass" v-for="(coupon, index) in orderInfo.store_voucher_list[this.couponType.store_id]" :key="index"></Coupon>
|
||||||
<u-empty text="无可用优惠券" mode="coupon" v-if="!orderInfo.store_voucher_list[this.couponType.store_id].length"></u-empty>
|
<u-empty text="无可用优惠券" mode="coupon" v-if="!orderInfo.store_voucher_list[this.couponType.store_id].length" style="height: 200rpx"></u-empty>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</u-popup>
|
</u-popup>
|
||||||
<view class="bottom">
|
<view class="bottom">
|
||||||
@@ -142,7 +142,7 @@ export default {
|
|||||||
return num;
|
return num;
|
||||||
},
|
},
|
||||||
setFreight(freight, index) {
|
setFreight(freight, index) {
|
||||||
return freight[index];
|
return freight[index] || '0.00';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
@@ -309,32 +309,47 @@ export default {
|
|||||||
},
|
},
|
||||||
setTotalPrice() {
|
setTotalPrice() {
|
||||||
const goods = this.orderInfo.store_goods_total;
|
const goods = this.orderInfo.store_goods_total;
|
||||||
// console.log(this.freight);
|
let [freight, price, minPrice] = [0, 0, 0];
|
||||||
const freight = this.freight;
|
// 运费
|
||||||
let price = 0;
|
for (const key in this.freight) {
|
||||||
// 商品价格加上运费
|
if (this.freight.hasOwnProperty(key)) {
|
||||||
[goods, freight].forEach(object => {
|
const element = this.freight[key];
|
||||||
for (const key in object) {
|
freight += Number(element);
|
||||||
if (object.hasOwnProperty(key)) {
|
}
|
||||||
const element = object[key];
|
}
|
||||||
price += Number(element);
|
// 商品价格减去优惠券
|
||||||
|
// 店铺
|
||||||
|
for (const gid in goods) {
|
||||||
|
if (goods.hasOwnProperty(gid)) {
|
||||||
|
// 计算最小价格
|
||||||
|
minPrice += 0.01;
|
||||||
|
// 每个店铺所有商品的价格
|
||||||
|
let sprice = Number(goods[gid]);
|
||||||
|
if(JSON.stringify(this.storeCoupon) != '{}') {
|
||||||
|
for (const cid in this.storeCoupon) {
|
||||||
|
if (this.storeCoupon.hasOwnProperty(cid)) {
|
||||||
|
const cprice = this.storeCoupon[cid];
|
||||||
|
// 商品减去优惠券价格
|
||||||
|
if(gid == cid) {
|
||||||
|
sprice -= cprice.voucher_price;
|
||||||
|
// 每个店铺最低付款 0.01
|
||||||
|
if(sprice <= 0) sprice = 0.01;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 所有商品总价
|
||||||
|
price += sprice;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
|
||||||
// 减去优惠券
|
|
||||||
// 平台
|
// 平台
|
||||||
if(JSON.stringify(this.choiceCoupon) != '{}') price -= Number(this.choiceCoupon.voucher_price);
|
if(JSON.stringify(this.choiceCoupon) != '{}') price -= Number(this.choiceCoupon.voucher_price);
|
||||||
// 店铺
|
// 每个店铺最低付款 0.01
|
||||||
if(JSON.stringify(this.storeCoupon) != '{}') {
|
if(price <= minPrice) price = minPrice;
|
||||||
for (const key in this.storeCoupon) {
|
// console.log("minPrice" + minPrice);
|
||||||
if (this.storeCoupon.hasOwnProperty(key)) {
|
// console.log("freight:" + freight);
|
||||||
const element = this.storeCoupon[key];
|
// console.log("price:" + price);
|
||||||
price -= element.voucher_price;
|
this.totalPrice = (price + freight).toFixed(2);
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// console.log(price);
|
|
||||||
this.totalPrice = price.toFixed(2);
|
|
||||||
},
|
},
|
||||||
setDelivery(index) {
|
setDelivery(index) {
|
||||||
if(index == 1) {
|
if(index == 1) {
|
||||||
|
|||||||
@@ -17,7 +17,11 @@
|
|||||||
<view class="right">
|
<view class="right">
|
||||||
<view class="name u-line-1">{{ goods.goods_name }}</view>
|
<view class="name u-line-1">{{ goods.goods_name }}</view>
|
||||||
<view class="briefing u-line-1">{{ goods.goods_advword }}</view>
|
<view class="briefing u-line-1">{{ goods.goods_advword }}</view>
|
||||||
<view class="price">¥{{ goods.goods_price }}</view>
|
<!-- <view class="price">¥{{ goods.goods_price }}</view> -->
|
||||||
|
<view class="price">
|
||||||
|
<view class="present">¥{{ goods.goods_price }}</view>
|
||||||
|
<view class="origin">¥{{ goods.goods_marketprice }}</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<u-loadmore :status="loadStatus" bgColor="#FFFFFF" margin-top="20" margin-bottom="20" v-if="goodsList.length >= pageSize"></u-loadmore>
|
<u-loadmore :status="loadStatus" bgColor="#FFFFFF" margin-top="20" margin-bottom="20" v-if="goodsList.length >= pageSize"></u-loadmore>
|
||||||
@@ -189,9 +193,23 @@ export default {
|
|||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: rgba(102,102,102,1);
|
color: rgba(102,102,102,1);
|
||||||
}
|
}
|
||||||
|
// .price {
|
||||||
|
// font-size: 26rpx;
|
||||||
|
// color: rgba(255,49,49,1);
|
||||||
|
// }
|
||||||
.price {
|
.price {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
.present {
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
color: rgba(255,49,49,1);
|
color: rgba(255,49,49,1);
|
||||||
|
margin-right: 20rpx;
|
||||||
|
}
|
||||||
|
.origin {
|
||||||
|
text-decoration: line-through;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="listItem">
|
<view class="listItem">
|
||||||
<!-- <video :src="url" :show-fullscreen-btn="true"></video> -->
|
|
||||||
<view v-if="type == '2'" class="video-container">
|
<view v-if="type == '2'" class="video-container">
|
||||||
<image :src="url" mode="aspectFill" class="video"></image>
|
<image :src="url" mode="aspectFill" class="video"></image>
|
||||||
|
<view class="backs"></view>
|
||||||
<image src="/static/videoPlay.png" mode="aspectFill" class="play-video"></image>
|
<image src="/static/videoPlay.png" mode="aspectFill" class="play-video"></image>
|
||||||
</view>
|
</view>
|
||||||
<image v-else :src="url" mode="aspectFill"></image>
|
<image v-else :src="url" mode="aspectFill"></image>
|
||||||
@@ -27,6 +27,15 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
.backs {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
background-color: rgba($color: #000000, $alpha: 0.35);
|
||||||
|
z-index: 9;
|
||||||
|
}
|
||||||
.play-video {
|
.play-video {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 100rpx;
|
width: 100rpx;
|
||||||
@@ -47,6 +56,6 @@ export default {
|
|||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
props:['url','type']
|
props:['url','type'],
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="videoTop">
|
<view class="videoTop">
|
||||||
<image :src="url" mode="aspectFill" class="video"></image>
|
<image :src="url" mode="aspectFill" class="video"></image>
|
||||||
|
<view class="backs"></view>
|
||||||
<image src="/static/videoPlay.png" mode="aspectFill" class="play-video"></image>
|
<image src="/static/videoPlay.png" mode="aspectFill" class="play-video"></image>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@@ -15,6 +16,15 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
z-index: 9;
|
z-index: 9;
|
||||||
|
}
|
||||||
|
.backs {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
background-color: rgba(0, 0, 0, 0.35);
|
||||||
|
z-index: 9;
|
||||||
}
|
}
|
||||||
.play-video {
|
.play-video {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<scroll-view scroll-y class="scroll-container" :style="{ height: scrollHeight }" @scrolltolower="loadMore">
|
<scroll-view scroll-y class="scroll-container" :style="{ height: scrollHeight }" @scrolltolower="loadMore">
|
||||||
<view class="goods-container">
|
<view class="goods-container">
|
||||||
<view v-for="goods in goodsList" :key="goods.goods_id" class="goods-view" @click="toDetailsPage(goods.goods_id)">
|
<view v-for="goods in goodsList" :key="goods.goods_id" class="goods-view">
|
||||||
<goodsItem :info="goods"></goodsItem>
|
<goodsItem :info="goods"></goodsItem>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -128,12 +128,6 @@ export default {
|
|||||||
this.scrollHeight = res.windowHeight - (res.windowWidth / 750) * 90 + 'px';
|
this.scrollHeight = res.windowHeight - (res.windowWidth / 750) * 90 + 'px';
|
||||||
// console.log(this.scrollHeight);
|
// console.log(this.scrollHeight);
|
||||||
},
|
},
|
||||||
toDetailsPage(id) {
|
|
||||||
this.$u.route('/pageB/sdetails/index', {
|
|
||||||
id: id,
|
|
||||||
type: 1 // 商品详情 商品类型 1普通 2拼团 3秒杀 4优惠券
|
|
||||||
});
|
|
||||||
},
|
|
||||||
setTitle(title){
|
setTitle(title){
|
||||||
uni.setNavigationBarTitle({
|
uni.setNavigationBarTitle({
|
||||||
title: title
|
title: title
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
<goodsItem :info="goods"></goodsItem>
|
<goodsItem :info="goods"></goodsItem>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<u-loadmore :status="loadStatus" bgColor="#FFFFFF" margin-top="20" margin-bottom="20" v-if="goodsList.length >= pageSize"></u-loadmore>
|
<u-loadmore :status="loadStatus" bgColor="#FFFFFF" margin-bottom="120" v-if="goodsList.length >= pageSize"></u-loadmore>
|
||||||
<u-empty mode="list" v-if="!goodsList.length"></u-empty>
|
<u-empty mode="list" v-if="!goodsList.length"></u-empty>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -46,7 +46,7 @@
|
|||||||
<imageTop v-else :url="item.article_pic" @click.native="toDetailsPage({ id: item.article_id, type: item.type })"></imageTop>
|
<imageTop v-else :url="item.article_pic" @click.native="toDetailsPage({ id: item.article_id, type: item.type })"></imageTop>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="indexlist.length" class="container-bottom">
|
<view v-if="indexlist.length" class="container-bottom">
|
||||||
<listitem v-for="item in indexlist" :key="item.id" :type="item.type" :url="item.article_pic" class="bottom-item" @click.native="toDetailsPage({ id: item.article_id, type: item.type })"></listitem>
|
<listitem v-for="item in indexlist" :key="item.article_id" :type="item.type" :url="item.article_pic" class="bottom-item" @click.native="toDetailsPage({ id: item.article_id, type: item.type })"></listitem>
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
<view class="item" v-if="cur==1">
|
<view class="item" v-if="cur==1">
|
||||||
@@ -220,7 +220,7 @@ export default {
|
|||||||
},
|
},
|
||||||
setViewHeight() {
|
setViewHeight() {
|
||||||
const res = uni.getSystemInfoSync();
|
const res = uni.getSystemInfoSync();
|
||||||
this.scrollHeiht = res.windowHeight - (73 + 20 + 170) + 'px';
|
this.scrollHeiht = res.windowHeight - res.windowWidth / 750 * (350 + 140 + 20) + 'px';
|
||||||
this.paddingTop = res.windowWidth / 750 * (90 + 50) + 'px';
|
this.paddingTop = res.windowWidth / 750 * (90 + 50) + 'px';
|
||||||
// console.log(this.paddingTop);
|
// console.log(this.paddingTop);
|
||||||
}
|
}
|
||||||
@@ -240,6 +240,7 @@ export default {
|
|||||||
// min-height: 100vh;
|
// min-height: 100vh;
|
||||||
background-color: #ECECEC;
|
background-color: #ECECEC;
|
||||||
padding-top: calc(350rpx - var(--window-top));
|
padding-top: calc(350rpx - var(--window-top));
|
||||||
|
overflow: hidden;
|
||||||
.top {
|
.top {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 0;
|
top: 0;
|
||||||
@@ -312,6 +313,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.follow {
|
.follow {
|
||||||
|
height: 140rpx;
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-bottom: 20rpx;
|
margin-bottom: 20rpx;
|
||||||
@@ -353,7 +355,7 @@ export default {
|
|||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
margin-bottom: 20rpx;
|
margin-bottom: 20rpx;
|
||||||
background-color: aqua;
|
// background-color: aqua;
|
||||||
}
|
}
|
||||||
.nickname {
|
.nickname {
|
||||||
font-size: 22rpx;
|
font-size: 22rpx;
|
||||||
@@ -365,7 +367,8 @@ export default {
|
|||||||
}
|
}
|
||||||
.main{
|
.main{
|
||||||
.video-image {
|
.video-image {
|
||||||
padding-bottom: 98rpx;
|
box-sizing: border-box;
|
||||||
|
padding-bottom: 100rpx;
|
||||||
}
|
}
|
||||||
.container-top {
|
.container-top {
|
||||||
> view {
|
> view {
|
||||||
@@ -381,9 +384,6 @@ export default {
|
|||||||
margin-bottom: 10rpx;
|
margin-bottom: 10rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// > view {
|
|
||||||
// margin-top: 20rpx;
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
.tabbar {
|
.tabbar {
|
||||||
border-top: 1rpx #DBDADA solid;
|
border-top: 1rpx #DBDADA solid;
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import SpecialGoods from "../../components/shop/special-shop/index"
|
import SpecialGoods from "@/components/shop/special-shop/index"
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -42,6 +42,7 @@ export default {
|
|||||||
// 全部秒杀
|
// 全部秒杀
|
||||||
getSpikeList() {
|
getSpikeList() {
|
||||||
this.$u.api.getSpikeList({ page: this.page }).then(res => {
|
this.$u.api.getSpikeList({ page: this.page }).then(res => {
|
||||||
|
console.log(res)
|
||||||
if(res.errCode == 0) {
|
if(res.errCode == 0) {
|
||||||
this.spikeList = res.data.list;
|
this.spikeList = res.data.list;
|
||||||
this.seckillTime = {
|
this.seckillTime = {
|
||||||
@@ -80,10 +81,14 @@ export default {
|
|||||||
// box-sizing: content-box;
|
// box-sizing: content-box;
|
||||||
width: 26rpx;
|
width: 26rpx;
|
||||||
// height: 25rpx;
|
// height: 25rpx;
|
||||||
background-color: #bfbfbf;
|
background-color: #000;
|
||||||
|
color: #ffffff;
|
||||||
margin: 0 10rpx;
|
margin: 0 10rpx;
|
||||||
padding: 2rpx;
|
padding: 2rpx;
|
||||||
}
|
}
|
||||||
|
.mah {
|
||||||
|
color: #999999;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<view id="actives">
|
<view id="actives" :style="{height : height + 'px'}">
|
||||||
<!-- 活动消息推送 -->
|
<!-- 活动消息推送 -->
|
||||||
<block v-for="(item, index) in actives" :key="index">
|
<block v-for="(item, index) in actives" :key="index">
|
||||||
<view class="time">{{ item.addtime }}</view>
|
<view class="time">{{ item.addtime }}</view>
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
<view class="content">
|
<view class="content">
|
||||||
<view class="title">{{item.title}}</view>
|
<view class="title">{{item.title}}</view>
|
||||||
<view class="images_about">
|
<view class="images_about">
|
||||||
<image :src="item.goods_image" mode="aspectFill"></image>
|
<image :src="item.picture" mode="aspectFill"></image>
|
||||||
<view>
|
<view>
|
||||||
<text class="u-line-2">{{item.summary}}</text>
|
<text class="u-line-2">{{item.summary}}</text>
|
||||||
</view>
|
</view>
|
||||||
@@ -15,6 +15,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
|
<u-loadmore :status="loadStatus" bg-color="#ECECEC" margin-top="20" v-if="loadStatus=='nomore'" />
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -22,13 +23,20 @@
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
actives: [
|
height:'600',
|
||||||
|
actives: [],
|
||||||
]
|
loadStatus: 'loadmore'
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad(){
|
onLoad(){
|
||||||
this.messageactivityList()
|
var _that = this
|
||||||
|
_that.messageactivityList();
|
||||||
|
uni.getSystemInfo({
|
||||||
|
success: function (res) {
|
||||||
|
console.log(res.windowHeight);
|
||||||
|
_that.height = res.windowHeight
|
||||||
|
}
|
||||||
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
titletext(){
|
titletext(){
|
||||||
@@ -38,6 +46,8 @@
|
|||||||
this.$u.api.messageactivityList({}).then((res)=>{
|
this.$u.api.messageactivityList({}).then((res)=>{
|
||||||
if (res.errCode == 0) {
|
if (res.errCode == 0) {
|
||||||
this.actives = res.data;
|
this.actives = res.data;
|
||||||
|
// 目前没有分页,只无数据提示用,他们建议这样做
|
||||||
|
if(!this.actives.length) this.loadStatus = 'nomore';
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -47,7 +57,7 @@
|
|||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss">
|
||||||
page {
|
page {
|
||||||
background-color: #ECECEC;
|
background-color: #ECECEC;
|
||||||
}
|
}
|
||||||
@@ -55,7 +65,7 @@
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
#actives{
|
#actives{
|
||||||
height: 100%;
|
background: #ECECEC;
|
||||||
.time {
|
.time {
|
||||||
padding: 30rpx 0;
|
padding: 30rpx 0;
|
||||||
color: #666;
|
color: #666;
|
||||||
@@ -73,7 +83,7 @@
|
|||||||
padding: 39rpx 0 30rpx;
|
padding: 39rpx 0 30rpx;
|
||||||
}
|
}
|
||||||
.content{
|
.content{
|
||||||
width:630rpx;
|
width:94%;
|
||||||
padding: 30rpx;
|
padding: 30rpx;
|
||||||
background:rgba(255,255,255,1);
|
background:rgba(255,255,255,1);
|
||||||
border-radius:20rpx;
|
border-radius:20rpx;
|
||||||
@@ -97,6 +107,7 @@
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 140rpx;
|
height: 140rpx;
|
||||||
|
line-height: 36rpx;
|
||||||
padding: 20rpx;
|
padding: 20rpx;
|
||||||
background: rgba(241,241,241,1);
|
background: rgba(241,241,241,1);
|
||||||
& > text {
|
& > text {
|
||||||
|
|||||||
@@ -2,22 +2,23 @@
|
|||||||
<view id="actives">
|
<view id="actives">
|
||||||
<!-- 活动消息推送 -->
|
<!-- 活动消息推送 -->
|
||||||
<view class="activity" v-for="(item, index) in actives" :key="index">
|
<view class="activity" v-for="(item, index) in actives" :key="index">
|
||||||
<view class="times">{{item.type}}</view>
|
<view class="times">{{item.kd_time}}</view>
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<view class="store_name">
|
<view class="store_name">
|
||||||
<image src="../../pageE/static/mine/1.png"></image>
|
<image :src="item.store_avatar"></image>
|
||||||
<view>小时代</view>
|
<view>{{item.store_name}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="xiantiao"></view>
|
<view class="xiantiao"></view>
|
||||||
<view class="title">{{item.name}}</view>
|
<view class="title">{{item.title}}</view>
|
||||||
<view class="images_about">
|
<view class="images_about" @click="viewLogistics(item)">
|
||||||
<image :src="item.url"></image>
|
<image :src="item.picture"></image>
|
||||||
<view>
|
<view>
|
||||||
<text>{{item.about}}</text>
|
<text>{{item.summary}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<u-loadmore :status="loadStatus" bg-color="#ECECEC" margin-top="20" @loadmore="loadmore" />
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -26,19 +27,56 @@
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
actives: [],
|
actives: [],
|
||||||
page: 1
|
page: 1,
|
||||||
|
timer: true,
|
||||||
|
loadStatus: 'loadmore'
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
this.getCartList();
|
this.getCartList();
|
||||||
},
|
},
|
||||||
|
onReachBottom() {
|
||||||
|
this.loadmore();
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getCartList() {
|
loadmore() {
|
||||||
this.$u.post("message/orderDeliveryList",{page: this.page}).then(res => {
|
if(!this.timer) return false;
|
||||||
if (res.errCode == 0) {
|
this.loadStatus = "loading";
|
||||||
this.actives == res.data;
|
this.page++;
|
||||||
|
this.getCartList({ load: 'loadmore' }).then(length => {
|
||||||
|
if(length == 0) {
|
||||||
|
this.page--;
|
||||||
|
this.loadStatus = 'nomore';
|
||||||
|
} else {
|
||||||
|
this.loadStatus = 'loading';
|
||||||
}
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
this.loadStatus = "nomore";
|
||||||
|
this.page--;
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
async getCartList({ load = 'reload' } = {}) {
|
||||||
|
const res = await this.$u.post("message/orderDeliveryList",{ page: this.page })
|
||||||
|
this.timer = true;
|
||||||
|
if (res.errCode == 0) {
|
||||||
|
if(load == 'reload') {
|
||||||
|
this.actives = res.data.data;
|
||||||
|
if(res.data.data.length < 12) this.loadStatus = "nomore";
|
||||||
|
}
|
||||||
|
else if(load == 'loadmore') this.actives.push(...res.data.data);
|
||||||
|
}
|
||||||
|
return res.data.data.length;
|
||||||
|
},
|
||||||
|
viewLogistics(item) {
|
||||||
|
let url;
|
||||||
|
if(item.takeawayer_phone) {
|
||||||
|
url = '/pageE/order/Details';
|
||||||
|
} else {
|
||||||
|
url = '/pageE/order/Logistics';
|
||||||
|
}
|
||||||
|
this.$u.route(url, {
|
||||||
|
oid: item.order_id,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components:{
|
components:{
|
||||||
@@ -46,7 +84,10 @@
|
|||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" >
|
||||||
|
page{
|
||||||
|
background-color: #ECECEC;
|
||||||
|
}
|
||||||
#actives{
|
#actives{
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<view>
|
<view id="viewes" :style="{height : height + 'px'}">
|
||||||
<!-- 公告咨询 -->
|
<!-- 公告咨询 -->
|
||||||
<notice :list="list"></notice>
|
<notice :list="list"></notice>
|
||||||
|
<u-loadmore :status="loadStatus" bg-color="#ECECEC" margin-top="20" v-if="loadStatus=='nomore'" />
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -11,18 +12,27 @@
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
list: [],
|
list: [],
|
||||||
|
loadStatus: 'loadmore'
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
this.informationList();
|
this.informationList();
|
||||||
|
var _that = this
|
||||||
|
uni.getSystemInfo({
|
||||||
|
success: function (res) {
|
||||||
|
console.log(res.windowHeight);
|
||||||
|
_that.height = res.windowHeight
|
||||||
|
}
|
||||||
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
titletext(){
|
titletext() {},
|
||||||
},
|
|
||||||
informationList() {
|
informationList() {
|
||||||
this.$u.api.informationList({}).then((res) => {
|
this.$u.api.informationList({}).then((res) => {
|
||||||
if (res.errCode == 0) {
|
if (res.errCode == 0) {
|
||||||
this.list = res.data;
|
this.list = res.data;
|
||||||
|
// 目前没有分页,只无数据提示用
|
||||||
|
if(!this.list.length) this.loadStatus = 'nomore';
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -37,6 +47,9 @@
|
|||||||
page {
|
page {
|
||||||
background-color: #ECECEC;
|
background-color: #ECECEC;
|
||||||
}
|
}
|
||||||
|
#viewes{
|
||||||
|
background: #ECECEC;
|
||||||
|
}
|
||||||
.sousuo {
|
.sousuo {
|
||||||
height: 113rpx;
|
height: 113rpx;
|
||||||
border: 1px #f00 solid;
|
border: 1px #f00 solid;
|
||||||
|
|||||||
@@ -59,7 +59,7 @@
|
|||||||
<div :class="[audio.visible ? 'record-icon record-open':'record-icon']" @click="switchAudioKeyboard"></div>
|
<div :class="[audio.visible ? 'record-icon record-open':'record-icon']" @click="switchAudioKeyboard"></div>
|
||||||
<div class="record-input" @longpress="onRecordStart" @touchend="onRecordEnd" v-if="audio.visible" >{{audio.recording ? '松开发送' : '按住录音'}}</div>
|
<div class="record-input" @longpress="onRecordStart" @touchend="onRecordEnd" v-if="audio.visible" >{{audio.recording ? '松开发送' : '按住录音'}}</div>
|
||||||
<div class="message-input" v-else>
|
<div class="message-input" v-else>
|
||||||
<input type="text" placeholder="发送消息" v-model="content">
|
<input type="text" placeholder="发送消息" v-model="content" @click="bindtapInput">
|
||||||
</div>
|
</div>
|
||||||
<div class="file-icon img-video" @click="sendImage"></div>
|
<div class="file-icon img-video" @click="sendImage"></div>
|
||||||
<div class="file-icon" @click="sendVideo"></div>
|
<div class="file-icon" @click="sendVideo"></div>
|
||||||
@@ -84,6 +84,7 @@
|
|||||||
return {
|
return {
|
||||||
//聊天文本框
|
//聊天文本框
|
||||||
content: '',
|
content: '',
|
||||||
|
bottom : '',
|
||||||
friend: null,
|
friend: null,
|
||||||
currentUser: null,
|
currentUser: null,
|
||||||
//已经接收到的消息
|
//已经接收到的消息
|
||||||
@@ -154,6 +155,11 @@
|
|||||||
this.imService.resetFriendUnReadMessage(this.friend);
|
this.imService.resetFriendUnReadMessage(this.friend);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
bindtapInput(){
|
||||||
|
console.log("222")
|
||||||
|
var _that = this;
|
||||||
|
_that.bottom = 14
|
||||||
|
},
|
||||||
initialListeners () {
|
initialListeners () {
|
||||||
//传入监听器,收到一条私聊消息总是滚到到页面底部
|
//传入监听器,收到一条私聊消息总是滚到到页面底部
|
||||||
this.imService.onNewPrivateMessageReceive = (friendId, message)=> {
|
this.imService.onNewPrivateMessageReceive = (friendId, message)=> {
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import common from '@/static/js/common.js'
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
nodes: '',
|
nodes: "",
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
@@ -18,6 +18,9 @@ export default {
|
|||||||
if(option.type == 1) this.certificateInfo();
|
if(option.type == 1) this.certificateInfo();
|
||||||
if(option.type == 2) this.getAboutUsInfo();
|
if(option.type == 2) this.getAboutUsInfo();
|
||||||
},
|
},
|
||||||
|
onNavigationBarButtonTap(e) {
|
||||||
|
console.log(e);
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
setTitle(title){
|
setTitle(title){
|
||||||
uni.setNavigationBarTitle({
|
uni.setNavigationBarTitle({
|
||||||
@@ -54,10 +57,12 @@ export default {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
// page {
|
||||||
|
// background-color: #ECECEC;
|
||||||
|
// }
|
||||||
.article-details {
|
.article-details {
|
||||||
min-height: calc(100vh - var(--window-top));
|
min-height: calc(100vh - var(--window-top));
|
||||||
background: #ECECEC;
|
background: #ECECEC;
|
||||||
padding: 20rpx 35rpx 0;
|
padding: 20rpx 35rpx 0;
|
||||||
line-height: 45rpx;
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -136,7 +136,7 @@ export default {
|
|||||||
sizeType: ['original', 'compressed'],
|
sizeType: ['original', 'compressed'],
|
||||||
sourceType: ['album'],
|
sourceType: ['album'],
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
this.avatar = res.tempFilePaths[0];
|
// this.avatar = res.tempFilePaths[0];
|
||||||
common.uploadFile({
|
common.uploadFile({
|
||||||
url: url,
|
url: url,
|
||||||
name: 'avatar',
|
name: 'avatar',
|
||||||
@@ -144,7 +144,7 @@ export default {
|
|||||||
}).then(result => {
|
}).then(result => {
|
||||||
// console.log(result);
|
// console.log(result);
|
||||||
// this.$set(this, 'avatar', result.file_path);
|
// this.$set(this, 'avatar', result.file_path);
|
||||||
// this.avatar = result.file_path;
|
this.avatar = result.file_path + "?" + new Date().getTime();
|
||||||
this.uploadPath = result.file_name;
|
this.uploadPath = result.file_name;
|
||||||
}, error => {
|
}, error => {
|
||||||
this.$u.toast(error);
|
this.$u.toast(error);
|
||||||
|
|||||||
@@ -18,7 +18,23 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<scroll-view scroll-y class="integral-botom" :style="{ height: integralHeight }">
|
<scroll-view scroll-y class="integral-botom" :style="{ height: integralHeight }">
|
||||||
|
|
||||||
|
<view class="medal-title">
|
||||||
|
<!-- <image src="../static/mine/29.png"></image> -->
|
||||||
|
<view>积分获取规则</view>
|
||||||
|
<!-- <image src="../static/mine/30.png"></image> -->
|
||||||
|
</view>
|
||||||
|
<view class="medal-content">
|
||||||
<rich-text :nodes="nodes"></rich-text>
|
<rich-text :nodes="nodes"></rich-text>
|
||||||
|
</view>
|
||||||
|
<view class="medal-title">
|
||||||
|
<!-- <image src="../static/mine/29.png"></image> -->
|
||||||
|
<view>会员等级权益</view>
|
||||||
|
<!-- <image src="../static/mine/30.png"></image> -->
|
||||||
|
</view>
|
||||||
|
<view class="medal-content">
|
||||||
|
<rich-text :nodes="dengji"></rich-text>
|
||||||
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@@ -30,6 +46,7 @@ export default {
|
|||||||
memberInfo: {},
|
memberInfo: {},
|
||||||
integralHeight: 0,
|
integralHeight: 0,
|
||||||
nodes: '',
|
nodes: '',
|
||||||
|
dengji:""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
@@ -47,6 +64,7 @@ export default {
|
|||||||
if (res.errCode == 0) {
|
if (res.errCode == 0) {
|
||||||
this.memberInfo = res.data;
|
this.memberInfo = res.data;
|
||||||
this.nodes = common.unescapeHTML(this.memberInfo.points_rule.document_content);
|
this.nodes = common.unescapeHTML(this.memberInfo.points_rule.document_content);
|
||||||
|
this.dengji = common.unescapeHTML(res.data.grade_rule.document_content)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -100,5 +118,24 @@ export default {
|
|||||||
top: 251rpx;
|
top: 251rpx;
|
||||||
z-index: 9;
|
z-index: 9;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.medal-title {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
margin-bottom: 52rpx;
|
||||||
|
> image {
|
||||||
|
width: 22rpx;
|
||||||
|
height: 22rpx;
|
||||||
|
}
|
||||||
|
> view {
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: rgba(51,51,51,1);
|
||||||
|
margin: 0 30rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.medal-content {
|
||||||
|
padding-bottom: 20rpx;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -27,9 +27,10 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
getMemberPointsStat() {
|
getMemberPointsStat() {
|
||||||
this.$u.api.getMemberPointsStat().then((res)=>{
|
this.$u.api.getMemberPointsStat().then((res)=>{
|
||||||
|
console.log(res)
|
||||||
if (res.errCode == 0) {
|
if (res.errCode == 0) {
|
||||||
this.title = res.data.grade_rule.document_title;
|
this.title = res.data.xunzhang_rule.document_title;
|
||||||
const nodes = res.data.grade_rule.document_content;
|
const nodes = res.data.xunzhang_rule.document_content;
|
||||||
this.nodes = common.unescapeHTML(nodes);
|
this.nodes = common.unescapeHTML(nodes);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,8 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="coupon-swiper">
|
<view class="coupon-swiper">
|
||||||
<!-- <scroll-view scroll-x="true" class="classify-coupon">
|
|
||||||
<view v-for="(classify, index) in couponGroupList" :key="index" class="classify-item" :class="{ 'active': couponCurrent == index }" @click="couponTabsChange(index)">{{ classify.gc_name }}</view>
|
|
||||||
</scroll-view> -->
|
|
||||||
<u-tabs :list="couponGroupList" name="gc_name" :is-scroll="true" :current="couponCurrent" @change="couponTabsChange" active-color="#FF780F" :show-bar="false" height="88" font-size="24" inactive-color="#333333"></u-tabs>
|
<u-tabs :list="couponGroupList" name="gc_name" :is-scroll="true" :current="couponCurrent" @change="couponTabsChange" active-color="#FF780F" :show-bar="false" height="88" font-size="24" inactive-color="#333333"></u-tabs>
|
||||||
<swiper :current="swiperCouponCurrent" @animationfinish="couponAnimationFinish" :style="{ height: swiperHeight }">
|
<swiper :current="swiperCouponCurrent" @animationfinish="couponAnimationFinish" :style="{ height: swiperHeight }">
|
||||||
<swiper-item class="swiper-coupon-item" v-for="(_, i) in couponGroupList" :key="i">
|
<swiper-item class="swiper-coupon-item" v-for="(_, i) in couponGroupList" :key="i">
|
||||||
@@ -11,17 +8,10 @@
|
|||||||
<Coupon :couponInfo="coupon" :status='0' :type="0" @exchange="exchangeCoupon($event)"></Coupon>
|
<Coupon :couponInfo="coupon" :status='0' :type="0" @exchange="exchangeCoupon($event)"></Coupon>
|
||||||
</view>
|
</view>
|
||||||
<u-empty text="暂无优惠券" mode="coupon" color="#000" v-if="!couponList[i] || !couponList[i].length"></u-empty>
|
<u-empty text="暂无优惠券" mode="coupon" color="#000" v-if="!couponList[i] || !couponList[i].length"></u-empty>
|
||||||
<u-loadmore :status="loadStatus" bgColor="#FFF" margin-bottom="60" v-if="!couponList[i] || couponList[i].length>=pageSize" @loadmore="onreachBottom"></u-loadmore>
|
<u-loadmore :status="loadStatus" bgColor="#FFF" margin-bottom="60" v-if="couponList[i] && couponList[i].length>=pageSize" @loadmore="onreachBottom"></u-loadmore>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper>
|
</swiper>
|
||||||
<!-- <scroll-view scroll-y style="height: 100%;" @scrolltolower="onreachBottom" class="coupon-scroll" :style="{ height: swiperHeight }">
|
|
||||||
<view v-for="(coupon, index) in couponList" :key="index" class="coupon-item">
|
|
||||||
<Coupon :couponInfo="coupon" :status='0' :type="0" @exchange="exchangeCoupon($event)"></Coupon>
|
|
||||||
</view>
|
|
||||||
<u-loadmore :status="loadStatus" bgColor="#FFF" margin-top="20" margin-bottom="20" v-if="couponList.length>=pageSize" @loadmore="onreachBottom"></u-loadmore>
|
|
||||||
<u-empty text="暂无优惠券" mode="coupon" color="#000" v-if="!couponList.length"></u-empty>
|
|
||||||
</scroll-view> -->
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
@@ -49,7 +39,6 @@ export default {
|
|||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
couponCurrent(index) {
|
couponCurrent(index) {
|
||||||
// this.couponList = [];
|
|
||||||
const id = this.couponGroupList[index].gc_id;
|
const id = this.couponGroupList[index].gc_id;
|
||||||
this.getCouponList({ gc_id: id, load: 'reload' });
|
this.getCouponList({ gc_id: id, load: 'reload' });
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -128,6 +128,7 @@ export default {
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
margin-left: 20rpx;
|
margin-left: 20rpx;
|
||||||
margin-bottom: 20rpx;
|
margin-bottom: 20rpx;
|
||||||
|
box-shadow: 0rpx 0rpx 6rpx 0rpx rgba(35,24,21,0.12);
|
||||||
.head{
|
.head{
|
||||||
width: 80rpx;
|
width: 80rpx;
|
||||||
height: 80rpx;
|
height: 80rpx;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="information">
|
<view class="information">
|
||||||
<view class="info-avatar">
|
<view class="info-avatar">
|
||||||
<u-avatar :src="userInfo.member_avatar + '?' + new Date().getTime()" :size="120"></u-avatar>
|
<u-avatar :src="userInfo.member_avatar" :size="120"></u-avatar>
|
||||||
</view>
|
</view>
|
||||||
<view class="info-item">
|
<view class="info-item">
|
||||||
<view class="title">昵称</view>
|
<view class="title">昵称</view>
|
||||||
|
|||||||
@@ -133,8 +133,10 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.collection-item {
|
.collection-item {
|
||||||
|
width: 100%;
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
.item {
|
.item {
|
||||||
|
width: 750rpx;
|
||||||
padding: 30rpx;
|
padding: 30rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
> image {
|
> image {
|
||||||
@@ -145,14 +147,17 @@ export default {
|
|||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
.title-wrap {
|
.title-wrap {
|
||||||
|
overflow: hidden;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
.item-top {
|
.item-top {
|
||||||
|
width: 100%;
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
color: rgba(51,51,51,1);
|
color: rgba(51,51,51,1);
|
||||||
line-height: 44rpx;
|
line-height: 44rpx;
|
||||||
margin-bottom: 54rpx;
|
margin-bottom: 54rpx;
|
||||||
}
|
}
|
||||||
.item-bottom {
|
.item-bottom {
|
||||||
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<view class="suggestions">
|
<view class="suggestions">
|
||||||
<view class="text">{{ item.fb_content }}</view>
|
<view class="text">{{ item.fb_content }}</view>
|
||||||
<view class="image">
|
<view class="image">
|
||||||
<image v-for="(url, index) in item.fb_images" :key="index" :src="url"></image>
|
<image v-for="(url, index) in item.fb_images" :key="index" :src="url" mode="aspectFit" @click="previewImage(item.fb_images, index)"></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="reply" v-if="item.is_reply">
|
<view class="reply" v-if="item.is_reply">
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
<view class="reply-content u-line-4">{{ item.reply_content }}</view>
|
<view class="reply-content u-line-4">{{ item.reply_content }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="date">
|
<view class="date">
|
||||||
<image src="../static/mine/26.png"></image>
|
<image src="../static/mine/26.png" mode="aspectFit"></image>
|
||||||
<view>{{ item.fb_time }}</view>
|
<view>{{ item.fb_time }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -45,6 +45,13 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
previewImage(urls, index) {
|
||||||
|
// console.log(urls);
|
||||||
|
uni.previewImage({
|
||||||
|
urls: urls,
|
||||||
|
current: urls[index]
|
||||||
|
});
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -76,7 +76,7 @@
|
|||||||
<view class="cancel" v-if="orderstate == '6'" @click="cancelOrder">取消支付</view>
|
<view class="cancel" v-if="orderstate == '6'" @click="cancelOrder">取消支付</view>
|
||||||
<!-- <view class="cancel" v-if="orderstate == '8'" @click="cancelOrder">取消订单</view> -->
|
<!-- <view class="cancel" v-if="orderstate == '8'" @click="cancelOrder">取消订单</view> -->
|
||||||
<view class="cancel" v-if="orderstate == '1' && orderInfo.shipping_code" @click="toOtherPage('Logistics')">查看物流</view>
|
<view class="cancel" v-if="orderstate == '1' && orderInfo.shipping_code" @click="toOtherPage('Logistics')">查看物流</view>
|
||||||
<view class="phone" v-if="orderstate == '1' && orderInfo.takeawayer_phone" @click="makePhone(order.takeawayer_phone)">
|
<view class="phone" v-if="orderstate == '1' && orderInfo.takeawayer_mobile" @click="makePhone(orderInfo.takeawayer_mobile)">
|
||||||
<u-icon name="phone-fill" color="#FF780F" size="28"></u-icon>
|
<u-icon name="phone-fill" color="#FF780F" size="28"></u-icon>
|
||||||
<text>联系骑手</text>
|
<text>联系骑手</text>
|
||||||
</view>
|
</view>
|
||||||
@@ -153,7 +153,6 @@ export default {
|
|||||||
clearInterval(this.timer);
|
clearInterval(this.timer);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
viewStoreDetails(id) {
|
viewStoreDetails(id) {
|
||||||
this.$u.route('pageC/merchant/index', {
|
this.$u.route('pageC/merchant/index', {
|
||||||
id: id
|
id: id
|
||||||
@@ -201,7 +200,7 @@ export default {
|
|||||||
this.$u.api.getOrderInfo({
|
this.$u.api.getOrderInfo({
|
||||||
order_id: id,
|
order_id: id,
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
console.log(res)
|
// console.log(res)
|
||||||
if(res.errCode == 0) {
|
if(res.errCode == 0) {
|
||||||
this.orderInfo = res.data;
|
this.orderInfo = res.data;
|
||||||
this.setTitle(this.orderInfo.view_type);
|
this.setTitle(this.orderInfo.view_type);
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="order">
|
<view class="order">
|
||||||
<view>
|
<view>
|
||||||
<!-- <u-tabs-swiper ref="tabs" :list="list" active-color="#FF780F" :current="current" font-size="26" @change="tabsChange" height="88" :gutter="30"></u-tabs-swiper> -->
|
|
||||||
<u-tabs :list="list" name="gc_name" :is-scroll="true" :current="current" @change="tabsChange" active-color="#FF780F" :show-bar="false" height="88" font-size="26" :gutter="20" inactive-color="#333333"></u-tabs>
|
<u-tabs :list="list" name="gc_name" :is-scroll="true" :current="current" @change="tabsChange" active-color="#FF780F" :show-bar="false" height="88" font-size="26" :gutter="20" inactive-color="#333333"></u-tabs>
|
||||||
</view>
|
</view>
|
||||||
<swiper :current="swiperCurrent" @animationfinish="animationfinish" :style="{ height: swiperHeight }">
|
<swiper :current="swiperCurrent" @animationfinish="animationfinish" :style="{ height: swiperHeight }">
|
||||||
@@ -14,7 +13,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<u-empty text="暂无订单" mode="order" color="#000000" v-if="!orderList[index] || !orderList[index].length"></u-empty>
|
<u-empty text="暂无订单" mode="order" color="#000000" v-if="!orderList[index] || !orderList[index].length"></u-empty>
|
||||||
<u-loadmore :status="loadStatus[index]" bgColor="#ECECEC" font-size="14" margin-bottom="20" v-if="current != 4 && (!orderList[index] || orderList[index].length>3)" class="order-loadmore"></u-loadmore>
|
<u-loadmore :status="loadStatus[index]" bgColor="#ECECEC" font-size="14" margin-bottom="20" v-if="current != 4 && (orderList[index] && orderList[index].length>3)" class="order-loadmore"></u-loadmore>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper>
|
</swiper>
|
||||||
@@ -175,8 +174,8 @@ export default {
|
|||||||
let promise;
|
let promise;
|
||||||
// if(this.current == 6) promise = this.getAfterSaleList();
|
// if(this.current == 6) promise = this.getAfterSaleList();
|
||||||
// else
|
// else
|
||||||
// if(this.current == 4) promise = this.goodsTryOrderList();
|
if(this.current == 4) promise = this.goodsTryOrderList();
|
||||||
promise = this.getOrderList();
|
else promise = this.getOrderList();
|
||||||
promise.then(length => {
|
promise.then(length => {
|
||||||
this.loadStatus.splice(this.current, 1, "nomore");
|
this.loadStatus.splice(this.current, 1, "nomore");
|
||||||
if(length == 0) this.page--;
|
if(length == 0) this.page--;
|
||||||
|
|||||||
@@ -22,9 +22,10 @@
|
|||||||
<view class="title">物流跟踪</view>
|
<view class="title">物流跟踪</view>
|
||||||
<view class="main">
|
<view class="main">
|
||||||
<view v-for="(item, index) in list" :key="index" class="logistics-item">
|
<view v-for="(item, index) in list" :key="index" class="logistics-item">
|
||||||
<view class="info u-line-2">{{ item.content }}</view>
|
<view class="info">{{ item.content }}</view>
|
||||||
<view class="date">{{ item.kd_time }}</view>
|
<view class="date">{{ item.kd_time }}</view>
|
||||||
</view>
|
</view>
|
||||||
|
<u-empty text="暂无物流信息" mode="data" icon-size="88" margin-top="60" v-if="!list.length"></u-empty>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -23,6 +23,7 @@
|
|||||||
import {
|
import {
|
||||||
mapMutations
|
mapMutations
|
||||||
} from 'vuex';
|
} from 'vuex';
|
||||||
|
import IMService from '@/static/imservice.js'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -63,7 +64,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '关于我们',
|
title: '关于我们',
|
||||||
link: '../mine/ArticleDetails?type=2'
|
// link: '../mine/ArticleDetails?type=2'
|
||||||
|
link: '/pageE/setting/version'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '帮助与反馈',
|
title: '帮助与反馈',
|
||||||
@@ -88,7 +90,10 @@
|
|||||||
url: url
|
url: url
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
loginOut() {
|
async loginOut() {
|
||||||
|
// 显示新人领取优惠券
|
||||||
|
this.$store.commit('updateShowCoupons', true);
|
||||||
|
let im = this.imService
|
||||||
this.logout();
|
this.logout();
|
||||||
uni.redirectTo({
|
uni.redirectTo({
|
||||||
url: "../../pageA/login/login",
|
url: "../../pageA/login/login",
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
src: 'https://dmmall.sdbairui.com/uploads/home/avatar/avatar_19.jpg',
|
src: 'https://mall.dmygkeji.com/uploads/home/avatar/avatar_19.jpg',
|
||||||
userList: [],
|
userList: [],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
<view class="feedback-box">
|
<view class="feedback-box">
|
||||||
<view class="feedback-title">人工服务</view>
|
<view class="feedback-title">人工服务</view>
|
||||||
<view class="feedback-itme">
|
<view class="feedback-itme">
|
||||||
<view class="manual">
|
<view class="manual" @click="makePhone">
|
||||||
<view class="service-phone">拨打官方客服电话:400-100-100</view>
|
<view class="service-phone">拨打官方客服电话:{{ tel400 }}</view>
|
||||||
<view class="manual-time">{{ wkTime }}</view>
|
<view class="manual-time">{{ wkTime }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="suggestions" @click="writeComments">意见反馈</view>
|
<view class="suggestions" @click="writeComments">意见反馈</view>
|
||||||
@@ -31,6 +31,11 @@ export default {
|
|||||||
this.getHelpList();
|
this.getHelpList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
makePhone() {
|
||||||
|
uni.makePhoneCall({
|
||||||
|
phoneNumber: this.tel400,
|
||||||
|
});
|
||||||
|
},
|
||||||
viewAnswer(item) {
|
viewAnswer(item) {
|
||||||
this.$store.commit('setQuestion', item);
|
this.$store.commit('setQuestion', item);
|
||||||
this.$u.route('pageE/setting/question');
|
this.$u.route('pageE/setting/question');
|
||||||
|
|||||||
73
pageE/setting/updateVersion.vue
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
<template>
|
||||||
|
<u-modal v-model="show" :show-cancel-button="is_focus_upgrade" confirm-text="升级" title="发现新版本" @cancel="cancel" @confirm="confirm">
|
||||||
|
<view class="u-update-content">
|
||||||
|
<!-- <rich-text :nodes="content"></rich-text> -->
|
||||||
|
</view>
|
||||||
|
</u-modal>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
is_focus_upgrade: Boolean, // 是否强制更新
|
||||||
|
show: true,
|
||||||
|
// 传递给uni-app"rich-text"组件的内容,可以使用"<br>"进行换行
|
||||||
|
content: `
|
||||||
|
1. 新增几个bug<br>
|
||||||
|
2. 新增Modal模态框组件<br>
|
||||||
|
3. 新增压窗屏组件,可以在APP上以弹窗的形式遮盖导航栏和底部tabbar<br>
|
||||||
|
`,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad(option) {
|
||||||
|
this.is_focus_upgrade = option.status == 1 ? false : true;
|
||||||
|
},
|
||||||
|
onReady() {
|
||||||
|
this.show = true;
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
cancel() {
|
||||||
|
this.closeModal();
|
||||||
|
},
|
||||||
|
confirm() {
|
||||||
|
// #ifdef APP-PLUS
|
||||||
|
if (plus.os.name == "Android") {
|
||||||
|
const appurl = "market://details?id=com.tencent.mobileqq"; //这个是通用应用市场,如果想指定某个应用商店,需要单独查这个应用商店的包名或scheme及参数
|
||||||
|
plus.runtime.openURL(appurl);
|
||||||
|
} else if(plus.os.name == "ios") {
|
||||||
|
const appurl = "itms-apps://itunes.apple.com/cn/app/id1144816653?mt=8";
|
||||||
|
plus.runtime.openURL(appurl);
|
||||||
|
}
|
||||||
|
// endif
|
||||||
|
// ifdef H5
|
||||||
|
this.closeModal();
|
||||||
|
// #endif
|
||||||
|
},
|
||||||
|
closeModal() {
|
||||||
|
uni.navigateBack();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
page {
|
||||||
|
background-color: rgba(0, 0, 0, 0);
|
||||||
|
}
|
||||||
|
.u-mode-center-box {
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
// .u-full-content {
|
||||||
|
// background-color: #00C777;
|
||||||
|
// }
|
||||||
|
.u-update-content {
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: $u-content-color;
|
||||||
|
line-height: 1.7;
|
||||||
|
padding: 30rpx;
|
||||||
|
}
|
||||||
|
::v-deep.u-mode-center-box {
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
114
pageE/setting/version.vue
Normal file
@@ -0,0 +1,114 @@
|
|||||||
|
<template>
|
||||||
|
<view class="version">
|
||||||
|
<view class="header">
|
||||||
|
<image src="../../pageD/images/file.png" class="tit-img" mode=""></image>
|
||||||
|
<view class="title">德铭阳光</view>
|
||||||
|
<view class="tit-info">版本: {{ $app_version }} for {{ phone_type }}</view>
|
||||||
|
</view>
|
||||||
|
<view class="main">
|
||||||
|
<view @click="viewAboutUs">
|
||||||
|
<text class="title">产品介绍</text>
|
||||||
|
<u-icon name="arrow-right" color="#999"></u-icon>
|
||||||
|
</view>
|
||||||
|
<view class="version-view">
|
||||||
|
<text class="title">版本更新</text>
|
||||||
|
<text class="tips" v-if="version" @click="updateVersion">发现新版本: {{ version }}</text>
|
||||||
|
<text class="tips" v-else>已是最新版本</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
version: '',
|
||||||
|
phone_type: "",
|
||||||
|
status: '',
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad() {
|
||||||
|
this.getVersion();
|
||||||
|
this.phone_type = this.$u.os();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 检查版本号
|
||||||
|
getVersion() {
|
||||||
|
this.$u.post("Specialci/checkVersion",{ app_version: this.$app_version }).then(res => {
|
||||||
|
// console.log(res);
|
||||||
|
if(res.data.app_version != this.$app_version) {
|
||||||
|
this.version = res.data.app_version;
|
||||||
|
this.status = res.data.is_focus_upgrade; // 0 不强制 1 强制
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
viewAboutUs() {
|
||||||
|
this.$u.route('/pageE/mine/ArticleDetails', {
|
||||||
|
type: 2
|
||||||
|
});
|
||||||
|
},
|
||||||
|
updateVersion() {
|
||||||
|
this.$u.route('/pageE/setting/updateVersion', {
|
||||||
|
status: this.status
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.header {
|
||||||
|
width: 500rpx;
|
||||||
|
margin: 0 auto;
|
||||||
|
padding: 30rpx;
|
||||||
|
text-align: center;
|
||||||
|
.tit-img {
|
||||||
|
width: 200rpx;
|
||||||
|
height: 200rpx;
|
||||||
|
}
|
||||||
|
.title {
|
||||||
|
margin: 18rpx 0;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 26rpx;
|
||||||
|
letter-spacing: 2rpx;
|
||||||
|
}
|
||||||
|
.tit-info {
|
||||||
|
font-size: 22rpx;
|
||||||
|
color: #666;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.main {
|
||||||
|
margin: 20rpx 0;
|
||||||
|
& > view {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
width: 100%;
|
||||||
|
height: 100rpx;
|
||||||
|
padding: 0 20rpx;
|
||||||
|
line-height: 100rpx;
|
||||||
|
color: #333;
|
||||||
|
font-size: 30rpx;
|
||||||
|
background-color: #fff;
|
||||||
|
border-bottom: 1px solid #f2f2f2;
|
||||||
|
.title {
|
||||||
|
width: 200rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.tips {
|
||||||
|
color: #999;
|
||||||
|
font-size: 22rpx;
|
||||||
|
}
|
||||||
|
.version-view {
|
||||||
|
.tips {
|
||||||
|
flex: 1;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.u-content {
|
||||||
|
padding: 20rpx;
|
||||||
|
font-size: 30rpx;
|
||||||
|
text-indent: 1rem;
|
||||||
|
line-height: 1.2;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
BIN
pageE/static/mine/38.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
@@ -3,13 +3,14 @@
|
|||||||
<u-tabs-swiper ref="tabs" :list="list" :is-scroll="false" active-color="#FF780F" :current="current" font-size="32" :show-bar="false" @change="tabsChange" height="88" ></u-tabs-swiper>
|
<u-tabs-swiper ref="tabs" :list="list" :is-scroll="false" active-color="#FF780F" :current="current" font-size="32" :show-bar="false" @change="tabsChange" height="88" ></u-tabs-swiper>
|
||||||
<swiper :current="swiperCurrent" @animationfinish="animationfinish" :style="{ height: swiperHeight }">
|
<swiper :current="swiperCurrent" @animationfinish="animationfinish" :style="{ height: swiperHeight }">
|
||||||
<swiper-item class="swiper-item" v-for="(_, index) in list" :key="index">
|
<swiper-item class="swiper-item" v-for="(_, index) in list" :key="index">
|
||||||
<scroll-view scroll-y class="scroll-coupon">
|
<scroll-view scroll-y class="scroll-coupon" @scrolltolower="onreachBottom">
|
||||||
<view v-if="couponList[index]">
|
<view v-if="couponList[index]">
|
||||||
<view class="coupon-item" v-for="(coupon, c_index) in couponList[index]" :key="c_index">
|
<view class="coupon-item" v-for="(coupon, c_index) in couponList[index]" :key="c_index">
|
||||||
<Coupon :couponInfo="coupon" :status='index' @use="useCoupon($event)" :goodsClass="goodsClass"></Coupon>
|
<Coupon :couponInfo="coupon" :status='index' @use="useCoupon($event)" :goodsClass="goodsClass"></Coupon>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<u-empty text="暂无优惠券" mode="coupon" v-if="!couponList[index] || !couponList[index].length"></u-empty>
|
<u-empty text="暂无优惠券" mode="coupon" v-if="!couponList[index] || !couponList[index].length"></u-empty>
|
||||||
|
<u-loadmore :status="loadStatus[current]" bgColor="#FFFFFF" font-size="14" margin-top="20" margin-bottom="20" @loadmore="onreachBottom" v-if="!couponList[index] || couponList[index].length>=pageSize"></u-loadmore>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper>
|
</swiper>
|
||||||
@@ -32,6 +33,10 @@ export default {
|
|||||||
swiperHeight: '',
|
swiperHeight: '',
|
||||||
couponList: [],
|
couponList: [],
|
||||||
goodsClass: [],
|
goodsClass: [],
|
||||||
|
pageSize: 6,
|
||||||
|
page: 0,
|
||||||
|
timer: true,
|
||||||
|
loadStatus: ['loadmore', 'loadmore', 'loadmore'],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
@@ -46,8 +51,7 @@ export default {
|
|||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
current(value) {
|
current(value) {
|
||||||
let status = value + 1;
|
this.getMemberCouponList(value);
|
||||||
this.getMemberCouponList(status);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -56,20 +60,35 @@ export default {
|
|||||||
this.goodsClass = res.data;
|
this.goodsClass = res.data;
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getMemberCouponList(current) {
|
async getMemberCouponList({ load = 'reload' }) {
|
||||||
this.$u.api.getMemberCouponList({
|
if(load == 'reload') this.page = 0;
|
||||||
status: current
|
const res = await this.$u.api.getMemberCouponList({
|
||||||
}).then(res => {
|
status: this.current + 1, // 代金券状态 1:未用 2:已用 3:过期 4:收回
|
||||||
if(res.errCode == 0) {
|
page: this.page,
|
||||||
this.couponList[this.current] = res.data;
|
})
|
||||||
} else {
|
this.timer = true;
|
||||||
this.couponList[this.current] = [];
|
if(load == 'reload') this.couponList[this.current] = res.data;
|
||||||
}
|
else if(load == 'loadmore') this.couponList[this.current].push(...res.data);
|
||||||
this.$forceUpdate();
|
this.$forceUpdate();
|
||||||
|
// console.log(this.couponList);
|
||||||
|
return res.data.length;
|
||||||
|
},
|
||||||
|
onreachBottom() {
|
||||||
|
if(!this.timer) return false;
|
||||||
|
this.timer = false;
|
||||||
|
this.loadStatus.splice(this.current, 1, "loading");
|
||||||
|
this.page++;
|
||||||
|
this.getMemberCouponList({ load: 'loadmore' }).then(length => {
|
||||||
|
this.loadStatus.splice(this.current, 1, "nomore");
|
||||||
|
if(length == 0) this.page--;
|
||||||
|
}).catch(() => {
|
||||||
|
this.loadStatus.splice(this.current, 1, "nomore");
|
||||||
|
console.log(this.loadStatus[this.current]);
|
||||||
|
this.page--;
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
useCoupon(coupon) {
|
useCoupon(coupon) {
|
||||||
console.log(coupon);
|
// console.log(coupon);
|
||||||
// if(coupon.type == 1) {
|
// if(coupon.type == 1) {
|
||||||
// this.$u.route({
|
// this.$u.route({
|
||||||
// type: 'switchTab',
|
// type: 'switchTab',
|
||||||
@@ -81,7 +100,7 @@ export default {
|
|||||||
// });
|
// });
|
||||||
// }
|
// }
|
||||||
this.$u.route('pageE/useCoupon/index', {
|
this.$u.route('pageE/useCoupon/index', {
|
||||||
cid: coupon.voucher_id,
|
cid: coupon.vouchertemplate_id,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
setViewHeight() {
|
setViewHeight() {
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<u-action-sheet :list="actionList" v-model="showAction" :cancel-btn="true" @click="delHistory" border-radius="20"></u-action-sheet>
|
<u-action-sheet :list="actionList" v-model="showAction" :cancel-btn="true" @click="delHistory" border-radius="20"></u-action-sheet>
|
||||||
<u-empty text="暂无足迹" mode="list" color="#000" v-if="!historyList.length"></u-empty>
|
<u-empty text="暂无足迹" mode="list" color="#000" v-if="!historyList.length"></u-empty>
|
||||||
<u-loadmore :status="loadStatus" bgColor="#ECECEC" margin-top="20" margin-bottom="20" v-if="historyList.length > pageSize" @loadmore="reachBottom"></u-loadmore>
|
<u-loadmore class="load-size" :status="loadStatus" bgColor="#ECECEC" margin-top="20" margin-bottom="20" v-if="historyList.length >= pageSize" @loadmore="reachBottom"></u-loadmore>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
<view class="order-status">{{ item.order_status | viewStatus }}</view>
|
<view class="order-status">{{ item.order_status | viewStatus }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="order-info">
|
<view class="order-info">
|
||||||
<image :src="type == 1 ? item.goods_image : item.images[0]"></image>
|
<image :src="type == 1 ? item.goods_image : item.images[0]" mode="aspectFit"></image>
|
||||||
<view v-if="item.deliver_goods_type == 2 && item.order_status == 20">
|
<view v-if="item.deliver_goods_type == 2 && item.order_status == 20">
|
||||||
<view>骑手名字:{{ item.takeawayer_name || '' }}</view>
|
<view>骑手名字:{{ item.takeawayer_name || '' }}</view>
|
||||||
<view>联系方式:{{ item.takeawayer_mobile || '' }}</view>
|
<view>联系方式:{{ item.takeawayer_mobile || '' }}</view>
|
||||||
|
|||||||
@@ -85,7 +85,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</u-upload>
|
</u-upload>
|
||||||
</view>
|
</view>
|
||||||
<view class="wash-btn" @click="submitImage">确认送洗</view>
|
<view class="wash-btn" @click="$u.throttle(submitImage, 2000)">确认送洗</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
<swiper-item class="swiper-item">
|
<swiper-item class="swiper-item">
|
||||||
@@ -141,7 +141,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</u-upload>
|
</u-upload>
|
||||||
</view>
|
</view>
|
||||||
<view class="wash-btn" @click="submitImage">确认送洗</view>
|
<view class="wash-btn" @click="$u.throttle(submitImage, 2000)">确认送洗</view>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper>
|
</swiper>
|
||||||
<u-select v-model="showClothesType" :list="typeList" value-name="id" label-name="name" @confirm="confirmType" mode="single-column"></u-select>
|
<u-select v-model="showClothesType" :list="typeList" value-name="id" label-name="name" @confirm="confirmType" mode="single-column"></u-select>
|
||||||
@@ -160,7 +160,7 @@
|
|||||||
<text>选择订单</text>
|
<text>选择订单</text>
|
||||||
<u-icon name="close" color="#A29FA3" size="32" @click="showPopup=false"></u-icon>
|
<u-icon name="close" color="#A29FA3" size="32" @click="showPopup=false"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
<scroll-view scroll-y class="order-list">
|
<scroll-view scroll-y class="order-list" @scrolltolower="onreachBottom">
|
||||||
<u-radio-group v-model="value" @change="radioChange">
|
<u-radio-group v-model="value" @change="radioChange">
|
||||||
<view v-for="(items, index) in orderList" :key="index" class="order-item">
|
<view v-for="(items, index) in orderList" :key="index" class="order-item">
|
||||||
<view class="store">
|
<view class="store">
|
||||||
@@ -195,6 +195,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</u-radio-group>
|
</u-radio-group>
|
||||||
|
<u-loadmore :status="loadStatu" bgColor="#FFFFFF" font-size="14" margin-top="20" margin-bottom="20"></u-loadmore>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
<view class="order-btn" @click="confirm">确认</view>
|
<view class="order-btn" @click="confirm">确认</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -222,7 +223,7 @@ export default {
|
|||||||
}],
|
}],
|
||||||
typeList: [], // 商品类型列表
|
typeList: [], // 商品类型列表
|
||||||
orderList: [], // 商品列表
|
orderList: [], // 商品列表
|
||||||
page: 0,
|
page: 1,
|
||||||
current: 0,
|
current: 0,
|
||||||
swiperCurrent: 0,
|
swiperCurrent: 0,
|
||||||
areaList: [], // 地址列表
|
areaList: [], // 地址列表
|
||||||
@@ -244,6 +245,8 @@ export default {
|
|||||||
name: 'common', // 其他图片
|
name: 'common', // 其他图片
|
||||||
},
|
},
|
||||||
debounce: true,
|
debounce: true,
|
||||||
|
timer: true,
|
||||||
|
loadStatu: 'loadmore'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
@@ -284,20 +287,38 @@ export default {
|
|||||||
// console.log(e);
|
// console.log(e);
|
||||||
this.type = e[0];
|
this.type = e[0];
|
||||||
},
|
},
|
||||||
|
onreachBottom() {
|
||||||
|
if(!this.timer) return false;
|
||||||
|
this.timer = false;
|
||||||
|
this.loadStatu = "loading";
|
||||||
|
this.page++;
|
||||||
|
this.getOrderList({ load: 'loadmore' }).then(length => {
|
||||||
|
if(length == 0) {
|
||||||
|
this.page--;
|
||||||
|
this.loadStatu = "nomore";
|
||||||
|
} else {
|
||||||
|
this.loadStatu = "loadmore";
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
this.loadStatu = "nomore";
|
||||||
|
this.page--;
|
||||||
|
})
|
||||||
|
},
|
||||||
async getOrderList({ load = 'reload' } = {}) {
|
async getOrderList({ load = 'reload' } = {}) {
|
||||||
const res = await this.$u.api.getOrderList({
|
const res = await this.$u.api.getSendOrderList({
|
||||||
page: this.page,
|
page: this.page,
|
||||||
// type: '40',
|
|
||||||
})
|
})
|
||||||
this.timer = true;
|
this.timer = true;
|
||||||
if(res.errCode == 0) {
|
if(res.errCode == 0) {
|
||||||
if(load == 'reload') this.orderList = res.data;
|
if(load == 'reload') this.orderList = res.data;
|
||||||
else this.orderList.push(...res.data);
|
else this.orderList.push(...res.data);
|
||||||
}
|
}
|
||||||
return res;
|
return res.data.length;
|
||||||
},
|
},
|
||||||
submitImage() {
|
submitImage() {
|
||||||
if(!this.debounce) return;
|
// console.log(222);
|
||||||
|
if(!this.debounce) return false;
|
||||||
|
// console.log(111);
|
||||||
this.debounce = false;
|
this.debounce = false;
|
||||||
this.current == 0 ? this.$refs.platform.upload() : this.$refs.physical.upload();
|
this.current == 0 ? this.$refs.platform.upload() : this.$refs.physical.upload();
|
||||||
},
|
},
|
||||||
@@ -318,42 +339,42 @@ export default {
|
|||||||
validationParams() {
|
validationParams() {
|
||||||
if (this.current == 1) {
|
if (this.current == 1) {
|
||||||
if(this.$u.test.isEmpty(this.goodsName)) {
|
if(this.$u.test.isEmpty(this.goodsName)) {
|
||||||
this.showToast('商品名称不能为空', 'warning');
|
this.$u.toast('商品名称不能为空');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(this.current == 0) {
|
if(this.current == 0) {
|
||||||
if(JSON.stringify(this.checkedGoods) == '{}') {
|
if(JSON.stringify(this.checkedGoods) == '{}') {
|
||||||
this.showToast('订单不能为空', 'warning');
|
this.$u.toast('订单不能为空');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(this.$u.test.isEmpty(this.goodsStatus)) {
|
if(this.$u.test.isEmpty(this.goodsStatus)) {
|
||||||
this.showToast('衣服状况不能为空', 'warning');
|
this.$u.toast('衣服状况不能为空');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if(JSON.stringify(this.type) == '{}') {
|
if(JSON.stringify(this.type) == '{}') {
|
||||||
this.showToast('商品类型不能为空', 'warning');
|
this.$u.toast('商品类型不能为空');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if(this.$u.test.isEmpty(this.name)) {
|
if(this.$u.test.isEmpty(this.name)) {
|
||||||
this.showToast('送洗人不能为空', 'warning');
|
this.$u.toast('送洗人不能为空');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if(this.$u.test.isEmpty(this.phone)) {
|
if(this.$u.test.isEmpty(this.phone)) {
|
||||||
this.showToast('手机号不能为空', 'warning');
|
this.$u.toast('手机号不能为空');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if(!this.$u.test.mobile(this.phone)) {
|
if(!this.$u.test.mobile(this.phone)) {
|
||||||
this.showToast('手机号错误', 'warning');
|
this.$u.toast('手机号错误');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if(this.$u.test.isEmpty(this.area)) {
|
if(this.$u.test.isEmpty(this.area)) {
|
||||||
this.showToast('地址不能为空', 'warning');
|
this.$u.toast('地址不能为空');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if(this.$u.test.isEmpty(this.address)) {
|
if(this.$u.test.isEmpty(this.address)) {
|
||||||
this.showToast('详细地址不能为空', 'warning');
|
this.$u.toast('详细地址不能为空');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@@ -383,11 +404,10 @@ export default {
|
|||||||
}
|
}
|
||||||
// console.log(params);
|
// console.log(params);
|
||||||
this.$u.api.sendLaundrySave(params).then(res => {
|
this.$u.api.sendLaundrySave(params).then(res => {
|
||||||
this.$u.toast(res.message);
|
// this.$u.toast(res.message);
|
||||||
if(res.errCode == 0) {
|
if(res.errCode == 0) {
|
||||||
this.$refs.uToast.show({
|
this.$refs.uToast.show({
|
||||||
title: res.message,
|
title: res.message,
|
||||||
type: 'success',
|
|
||||||
back: true,
|
back: true,
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
@@ -452,12 +472,6 @@ export default {
|
|||||||
this.choose = false;
|
this.choose = false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
showToast(message, type) {
|
|
||||||
this.$refs.uToast.show({
|
|
||||||
title: message,
|
|
||||||
type: type,
|
|
||||||
})
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -78,10 +78,10 @@ export default {
|
|||||||
})
|
})
|
||||||
this.timer = true;
|
this.timer = true;
|
||||||
if(res.errCode == 0) {
|
if(res.errCode == 0) {
|
||||||
if(load == 'reload') this.goodsList = res.data.data;
|
if(load == 'reload') this.goodsList = res.data;
|
||||||
else if(load == 'loadmore') this.goodsList.push(...res.data.data);
|
else if(load == 'loadmore') this.goodsList.push(...res.data);
|
||||||
}
|
}
|
||||||
return res.data.data.length;
|
return res.data.length;
|
||||||
},
|
},
|
||||||
loadMore() {
|
loadMore() {
|
||||||
if(this.goodsList.length < this.pageSize) return false;
|
if(this.goodsList.length < this.pageSize) return false;
|
||||||
@@ -106,7 +106,7 @@ export default {
|
|||||||
},
|
},
|
||||||
setViewHeight() {
|
setViewHeight() {
|
||||||
const res = uni.getSystemInfoSync();
|
const res = uni.getSystemInfoSync();
|
||||||
this.scrollHeight = res.windowHeight - (res.windowWidth / 750) * 90 + 'px';
|
this.scrollHeight = res.windowHeight - (res.windowWidth / 750) * (90 + 30) + 'px';
|
||||||
},
|
},
|
||||||
toDetailsPage(id) {
|
toDetailsPage(id) {
|
||||||
this.$u.route('/pageB/sdetails/index', {
|
this.$u.route('/pageB/sdetails/index', {
|
||||||
|
|||||||
40
pages.json
@@ -56,6 +56,7 @@
|
|||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "",
|
"navigationBarTitleText": "",
|
||||||
"navigationStyle": "custom",
|
"navigationStyle": "custom",
|
||||||
|
"backgroundColorBottom":"#000000",
|
||||||
"app-plus": {
|
"app-plus": {
|
||||||
"titleNView": false
|
"titleNView": false
|
||||||
}
|
}
|
||||||
@@ -79,6 +80,13 @@
|
|||||||
{
|
{
|
||||||
"root": "pageB",
|
"root": "pageB",
|
||||||
"pages": [
|
"pages": [
|
||||||
|
{
|
||||||
|
"path": "playVideo/index",
|
||||||
|
"style": {
|
||||||
|
"navigationStyle":"custom",
|
||||||
|
"backgroundColor":"#000000"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "follow/index",
|
"path": "follow/index",
|
||||||
"style": {
|
"style": {
|
||||||
@@ -370,7 +378,7 @@
|
|||||||
"searchInput": {
|
"searchInput": {
|
||||||
"align": "left",
|
"align": "left",
|
||||||
"borderRadius": "15px",
|
"borderRadius": "15px",
|
||||||
"placeholder": "搜索您需要的商品",
|
"placeholder": "搜索您需要的本店铺商品",
|
||||||
"backgroundColor": "rgb(236,236,236)",
|
"backgroundColor": "rgb(236,236,236)",
|
||||||
"disabled": true
|
"disabled": true
|
||||||
}
|
}
|
||||||
@@ -862,8 +870,9 @@
|
|||||||
"app-plus": {
|
"app-plus": {
|
||||||
"titleSize": "36px",
|
"titleSize": "36px",
|
||||||
"titleNView": {
|
"titleNView": {
|
||||||
"type": "transparent",
|
"type": "default",
|
||||||
"titleColor": "#ffffff"
|
"titleColor": "#ffffff",
|
||||||
|
"backgroundColor":"#F09C6A"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -992,6 +1001,31 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "setting/version",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "关于我们",
|
||||||
|
"app-plus": {
|
||||||
|
"titleSize": "36px",
|
||||||
|
"titleNView": {
|
||||||
|
"titleColor": "#333333",
|
||||||
|
"backgroundColor": "#FFFFFF"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "setting/updateVersion",
|
||||||
|
"style": {
|
||||||
|
"navigationStyle": "custom", // 取消本页面的导航栏
|
||||||
|
"app-plus": {
|
||||||
|
"animationType": "fade-in",
|
||||||
|
"background": "transparent",
|
||||||
|
"backgroundColor": "rgba(0,0,0,0)",
|
||||||
|
"popGesture": "none"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "order/Index",
|
"path": "order/Index",
|
||||||
"style": {
|
"style": {
|
||||||
|
|||||||
@@ -39,7 +39,8 @@
|
|||||||
</scroll-view>
|
</scroll-view>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
<swiper-item>
|
<swiper-item>
|
||||||
<scroll-view style="width:100%;height:100%" scroll-y="true" @scrolltolower="swiperBottom">
|
<scroll-view style="width:100%;height:100%" scroll-y="true" @scrolltolower="swiperBottomLive(e)" :refresher-enabled="true" @refresherrefresh="dianji(1)" :refresher-triggered="refresher" @refresherpulling="onPulling"
|
||||||
|
@refresherrestore="onRestore" @refresherabort="onAbort">
|
||||||
<view class="box">
|
<view class="box">
|
||||||
<u-swiper mode="dot" :list="zhiboImageSwiper" name="adv_code" @click="clickSImage($event, 2)"></u-swiper>
|
<u-swiper mode="dot" :list="zhiboImageSwiper" name="adv_code" @click="clickSImage($event, 2)"></u-swiper>
|
||||||
<view class="list">
|
<view class="list">
|
||||||
@@ -52,8 +53,12 @@
|
|||||||
:key="item.live_id" :name="item.room_name" :image="item.cover_img" :url="item.url" :item="item" @updateList="updateList"></zhiboItem>
|
:key="item.live_id" :name="item.room_name" :image="item.cover_img" :url="item.url" :item="item" @updateList="updateList"></zhiboItem>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<u-loadmore class="load-size" color="#999999" :status="status" icon-type="iconType" margin-top="50" margin-bottom="50" :load-text="loadText" />
|
<view style="height:600rpx" v-if="tabLiveLists.length == 0">
|
||||||
|
<u-empty text="暂无直播信息" mode="list"></u-empty>
|
||||||
</view>
|
</view>
|
||||||
|
<u-loadmore class="load-size" color="#999999" :status="status" v-if="tabLiveLists.length !=0" icon-type="iconType" margin-top="50" margin-bottom="50" :load-text="loadText" />
|
||||||
|
</view>
|
||||||
|
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
<swiper-item>
|
<swiper-item>
|
||||||
@@ -217,6 +222,7 @@
|
|||||||
|
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
|
import common from '@/static/js/common.js';
|
||||||
import { mapState } from 'vuex'
|
import { mapState } from 'vuex'
|
||||||
import videoItem from "@/components/index/video-item/index"
|
import videoItem from "@/components/index/video-item/index"
|
||||||
import zhiboItem from "@/components/index/zhibo-item/index"
|
import zhiboItem from "@/components/index/zhibo-item/index"
|
||||||
@@ -240,6 +246,7 @@
|
|||||||
num: 0,
|
num: 0,
|
||||||
page: 1, // 0即第一页
|
page: 1, // 0即第一页
|
||||||
follow_page: 0, //
|
follow_page: 0, //
|
||||||
|
live_page: 1, //
|
||||||
articleList: [],
|
articleList: [],
|
||||||
recommendList: [], // 推荐达人
|
recommendList: [], // 推荐达人
|
||||||
indexImageSwiper: [],
|
indexImageSwiper: [],
|
||||||
@@ -248,12 +255,14 @@
|
|||||||
fansList: [], // 关注的发现列表
|
fansList: [], // 关注的发现列表
|
||||||
status: 'loadmore',
|
status: 'loadmore',
|
||||||
status_1: 'loadmore',
|
status_1: 'loadmore',
|
||||||
|
status_live: 'loadmore',
|
||||||
iconType: 'circle',
|
iconType: 'circle',
|
||||||
loadText: {
|
loadText: {
|
||||||
loadmore: '轻轻上拉',
|
loadmore: '轻轻上拉',
|
||||||
loading: '努力加载中',
|
loading: '努力加载中',
|
||||||
nomore: '实在没有了'
|
nomore: '实在没有了'
|
||||||
},
|
},
|
||||||
|
refresher:true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
@@ -263,46 +272,74 @@
|
|||||||
darenItem
|
darenItem
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
this.page = 1;
|
console.log(this.imService.status)
|
||||||
if (this.page != 1) {
|
if(!this.imService.status && this.$store.state.hasLogin){
|
||||||
|
const user = uni.getStorageSync('user_info');
|
||||||
|
// console.log(user)
|
||||||
|
this.imService.login(user.member.member_id,user.member.member_nickname,user.member.member_avatar)
|
||||||
|
this.imService.connectIM()
|
||||||
|
|
||||||
|
}else if(!this.imService.status){
|
||||||
|
this.$u.api.getDefaultAvatar().then((res)=>{
|
||||||
|
console.log(res)
|
||||||
|
uni.setStorageSync("morenimg",res.data.avatar)
|
||||||
|
this.imService.login(new Date().getTime(),"123",res.data.avatar)
|
||||||
|
this.imService.connectIM()
|
||||||
|
console.log("用户信息")
|
||||||
|
})
|
||||||
|
console.log("链接")
|
||||||
}
|
}
|
||||||
// if (this.hasLogin) {
|
|
||||||
// this.isNewmembervoucher();
|
// if(!this.imService.status && !this.imService.lianjie){
|
||||||
|
// console.log("1212")
|
||||||
|
// this.imService.lianjie = true
|
||||||
|
// let that = this
|
||||||
|
// setTimeout(function(){
|
||||||
|
// that.imService.disconnect()
|
||||||
|
// console.log("guanbi")
|
||||||
|
// },1000)
|
||||||
|
// setTimeout(function(){
|
||||||
|
// console.log("lianjie")
|
||||||
|
// that.imService.connectIM()
|
||||||
|
// },2000)
|
||||||
// }
|
// }
|
||||||
|
// 新人优惠券
|
||||||
|
if (this.$store.state.showCoupons) {
|
||||||
|
this.isNewmembervoucher();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
async onLoad(){
|
async onLoad(){
|
||||||
this.articleList = [];
|
this.articleList = [];
|
||||||
this.getArticlelist();
|
this.getArticlelist();
|
||||||
this.getSwiper();
|
this.getSwiper();
|
||||||
// 优惠券
|
// 优惠券
|
||||||
if(this.$store.state.hasLogin){
|
// if(this.$store.state.hasLogin){
|
||||||
this.isNewmembervoucher();
|
// 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)
|
// await this.imService.connectIM()
|
||||||
await this.imService.connectIM()
|
|
||||||
|
|
||||||
}else{
|
// }else{
|
||||||
await this.$u.api.getDefaultAvatar().then((res)=>{
|
// await this.$u.api.getDefaultAvatar().then((res)=>{
|
||||||
console.log(res)
|
// console.log(res)
|
||||||
uni.setStorageSync("morenimg",res.data.avatar)
|
// uni.setStorageSync("morenimg",res.data.avatar)
|
||||||
this.imService.login(new Date().getTime(),"123",res.data.avatar)
|
// this.imService.login(new Date().getTime(),"123",res.data.avatar)
|
||||||
console.log("用户信息")
|
// console.log("用户信息")
|
||||||
})
|
// })
|
||||||
console.log("链接")
|
// console.log("链接")
|
||||||
await this.imService.connectIM()
|
// await this.imService.connectIM()
|
||||||
|
|
||||||
}
|
// }
|
||||||
console.log("1212")
|
// console.log("1212")
|
||||||
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)
|
||||||
},
|
},
|
||||||
onPullDownRefresh() {
|
onPullDownRefresh() {
|
||||||
this.page = 1;
|
this.page = 1;
|
||||||
@@ -318,27 +355,31 @@
|
|||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: "loading..."
|
title: "loading..."
|
||||||
})
|
})
|
||||||
this.$u.api.tabLiveList({page:this.page}).then((res) => {
|
this.$u.api.tabLiveList({page:this.live_page}).then((res) => {
|
||||||
// uni.stopPullDownRefresh();
|
// uni.stopPullDownRefresh();
|
||||||
this.status = "loading";
|
this.status_live = "loading";
|
||||||
|
this.refresher = false;
|
||||||
console.log(res)
|
console.log(res)
|
||||||
if (res.errCode == 0) {
|
if (res.errCode == 0) {
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
if (this.page == 1) {
|
if (this.live_page == 1) {
|
||||||
this.tabLiveLists = res.data.data;
|
this.tabLiveLists = res.data.data;
|
||||||
this.status = "loadmore";
|
this.status_live = "loadmore";
|
||||||
} else if (res.data.data.length == 0 && this.page > 1) {
|
if (res.data.data.length < 4) {
|
||||||
this.status = "nomore";
|
this.status_live = "nomore";
|
||||||
|
}
|
||||||
|
} else if (res.data.data.length == 0 && this.live_page > 1) {
|
||||||
|
this.status_live = "nomore";
|
||||||
} else {
|
} else {
|
||||||
this.tabLiveLists = this.tabLiveLists.concat(res.data.data);
|
this.tabLiveLists = this.tabLiveLists.concat(res.data.data);
|
||||||
console.log(this.tabLiveLists)
|
console.log(this.tabLiveLists)
|
||||||
}
|
}
|
||||||
if (res.data.data.length == 0 && this.page > 1) {
|
if (res.data.data.length == 0 && this.live_page > 1) {
|
||||||
} else {
|
} else {
|
||||||
this.page++;
|
this.live_page++;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.status = "nomore"
|
this.status_live = "nomore"
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
@@ -359,7 +400,12 @@
|
|||||||
member_id: member_id
|
member_id: member_id
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
this.follow_page = 0;
|
this.follow_page = 0;
|
||||||
this.getRecommendList(); // 关注列表
|
// this.getRecommendList(); // 关注列表
|
||||||
|
for(let i in this.recommendList){
|
||||||
|
if(this.recommendList[i].member_id == member_id){
|
||||||
|
this.recommendList[i].is_attention == 1 ? this.recommendList[i].is_attention = 0 : this.recommendList[i].is_attention = 1
|
||||||
|
}
|
||||||
|
}
|
||||||
this.getFollowList(); // 刷新发现的列表
|
this.getFollowList(); // 刷新发现的列表
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -372,28 +418,31 @@
|
|||||||
},
|
},
|
||||||
// 切换导航
|
// 切换导航
|
||||||
dianji(a) {
|
dianji(a) {
|
||||||
// console.log(a);
|
console.log(a);
|
||||||
|
|
||||||
if (a.type == "change") {
|
if (a.type == "change") {
|
||||||
this.num = a.detail.current
|
this.num = a.detail.current;
|
||||||
} else {
|
} else {
|
||||||
this.num = a;
|
this.num = a;
|
||||||
}
|
}
|
||||||
// console.log(this.num);
|
// console.log(this.num);
|
||||||
// 状态请求
|
// 状态请求
|
||||||
if (a.type == "change") { // 强制请求一次
|
if (a.type == "change" || this.num == 1) { // 强制请求一次
|
||||||
if (this.num == 0) {
|
if (this.num == 0) {
|
||||||
this.page = 1;
|
this.page = 1;
|
||||||
this.articleList = [];
|
this.articleList = [];
|
||||||
this.status = "loadmore";
|
this.status = "nomore";
|
||||||
this.getArticlelist();
|
this.getArticlelist();
|
||||||
this.getSwiper();
|
this.getSwiper();
|
||||||
} else if (this.num == 1) {
|
} else if (this.num == 1) {
|
||||||
this.page = 1;
|
this.live_page = 1;
|
||||||
|
this.status_live = "nomore";
|
||||||
this.getZhiBoSwiper(); // 直播轮播
|
this.getZhiBoSwiper(); // 直播轮播
|
||||||
this.tabLiveList();
|
this.tabLiveList();
|
||||||
} else if (this.num == 2) {
|
} else if (this.num == 2) {
|
||||||
this.follow_page = 0;
|
this.follow_page = 0;
|
||||||
this.fansList = [];
|
this.fansList = [];
|
||||||
|
this.status_1 = "nomore";
|
||||||
if (this.hasLogin) {
|
if (this.hasLogin) {
|
||||||
this.getFollowList(); // 关注列表
|
this.getFollowList(); // 关注列表
|
||||||
}
|
}
|
||||||
@@ -403,11 +452,6 @@
|
|||||||
},
|
},
|
||||||
// 发现列表
|
// 发现列表
|
||||||
getArticlelist() {
|
getArticlelist() {
|
||||||
if (this.page > 1) {
|
|
||||||
uni.showLoading({
|
|
||||||
title: "loading..."
|
|
||||||
})
|
|
||||||
}
|
|
||||||
this.$u.api.getArticlelist({
|
this.$u.api.getArticlelist({
|
||||||
page: this.page,
|
page: this.page,
|
||||||
is_video_img: 0, // 查询视频1 图文2 都查0
|
is_video_img: 0, // 查询视频1 图文2 都查0
|
||||||
@@ -415,40 +459,34 @@
|
|||||||
uni.stopPullDownRefresh();
|
uni.stopPullDownRefresh();
|
||||||
this.status = "loading";
|
this.status = "loading";
|
||||||
if (res.errCode == 0) {
|
if (res.errCode == 0) {
|
||||||
uni.hideLoading();
|
|
||||||
if (this.page == 1) {
|
if (this.page == 1) {
|
||||||
this.articleList = res.data.list;
|
this.articleList = res.data.list;
|
||||||
this.status = "loadmore";
|
if (!res.data.length) {
|
||||||
} else if (res.data.length == 0 && this.page > 1) {
|
this.status = "nomore";
|
||||||
|
}
|
||||||
|
} else if (res.data.length == 0) {
|
||||||
this.status = "nomore";
|
this.status = "nomore";
|
||||||
} else {
|
} else {
|
||||||
this.articleList = this.articleList.concat(res.data.list);
|
this.articleList = this.articleList.concat(res.data.list);
|
||||||
}
|
}
|
||||||
if (res.data.length == 0 && this.page > 1) {
|
|
||||||
} else {
|
|
||||||
this.page++;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
this.status = "nomore"
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
console.log(this.page);
|
||||||
},
|
},
|
||||||
// 屏蔽更新列表
|
// 屏蔽更新列表
|
||||||
updateList() {
|
updateList() {
|
||||||
this.page = 1;
|
this.page = 1;
|
||||||
|
this.articleList = [];
|
||||||
this.getArticlelist();
|
this.getArticlelist();
|
||||||
this.tabLiveList()
|
this.tabLiveList();
|
||||||
},
|
},
|
||||||
// 发现下拉加载
|
// 发现下拉加载
|
||||||
swiperBottom(e) {
|
swiperBottom(e) {
|
||||||
if(this.num == 0 ){
|
this.page++;
|
||||||
this.getArticlelist();
|
this.getArticlelist();
|
||||||
|
},
|
||||||
}else if(this.num == 1){
|
swiperBottomLive() {
|
||||||
console.log(123)
|
this.tabLiveList();
|
||||||
this.tabLiveList()
|
|
||||||
}
|
|
||||||
// console.log(e);
|
|
||||||
},
|
},
|
||||||
swiperTop() {
|
swiperTop() {
|
||||||
// uni.startPullDownRefresh();
|
// uni.startPullDownRefresh();
|
||||||
@@ -500,40 +538,20 @@
|
|||||||
},
|
},
|
||||||
clickFImage(index) {
|
clickFImage(index) {
|
||||||
const item = this.indexImageSwiper[index];
|
const item = this.indexImageSwiper[index];
|
||||||
console.log(item);
|
// console.log(item);
|
||||||
this.activityLink({
|
this.jumpPage({
|
||||||
type: item.url_type,
|
type: item.url_type,
|
||||||
id: item.info_id
|
id: item.info_id,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
clickSImage(index) {
|
clickSImage(index) {
|
||||||
const item = this.zhiboImageSwiper[index];
|
const item = this.zhiboImageSwiper[index];
|
||||||
console.log(item);
|
// console.log(item);
|
||||||
this.activityLink({
|
this.jumpPage({
|
||||||
type: item.url_type,
|
type: item.url_type,
|
||||||
id: item.info_id
|
id: item.info_id,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
activityLink({
|
|
||||||
type,
|
|
||||||
id
|
|
||||||
}) {
|
|
||||||
console.log(type,id);
|
|
||||||
if (type == 0) return false;
|
|
||||||
// type 1 商品详情页, 2 店铺详情页
|
|
||||||
const url = type == 1 ? 'pageB/sdetails/index' : 'pageC/merchant/index';
|
|
||||||
let params = {
|
|
||||||
id: id
|
|
||||||
};
|
|
||||||
// type: 1 // 商品详情 1普通 2拼团 3秒杀 4优惠券
|
|
||||||
if (type == 1) Object.assign(params, {
|
|
||||||
type: 1
|
|
||||||
});
|
|
||||||
this.$u.route({
|
|
||||||
url: url,
|
|
||||||
params: params
|
|
||||||
})
|
|
||||||
},
|
|
||||||
goSearch() {
|
goSearch() {
|
||||||
this.$u.route("/pageB/search/index", {
|
this.$u.route("/pageB/search/index", {
|
||||||
type: 2,
|
type: 2,
|
||||||
@@ -542,12 +560,27 @@
|
|||||||
},
|
},
|
||||||
// 是否显示新人优惠券
|
// 是否显示新人优惠券
|
||||||
isNewmembervoucher() {
|
isNewmembervoucher() {
|
||||||
|
this.$store.commit('updateShowCoupons', false);
|
||||||
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.$u.route('/pageB/coupon/index');
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
onPulling(e) {
|
||||||
|
console.log("onpulling", e);
|
||||||
|
},
|
||||||
|
onRestore() {
|
||||||
|
this.refresher = 'restore'; // 需要重置
|
||||||
|
console.log("onRestore");
|
||||||
|
},
|
||||||
|
onAbort() {
|
||||||
|
console.log("onAbort");
|
||||||
|
},
|
||||||
|
jumpPage(uri) {
|
||||||
|
// console.log(uri);
|
||||||
|
common.jumpPage({ type: uri.type, id: uri.id });
|
||||||
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -125,7 +125,7 @@
|
|||||||
const token = uni.getStorageSync('token');
|
const token = uni.getStorageSync('token');
|
||||||
let that = this
|
let that = this
|
||||||
uni.request({
|
uni.request({
|
||||||
url:"https://dmmall.sdbairui.com/api/Specialci/getAtwillUserInfo",
|
url:"https://mall.dmygkeji.com/api/Specialci/getAtwillUserInfo",
|
||||||
data:{
|
data:{
|
||||||
userId: 1
|
userId: 1
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -2,19 +2,8 @@
|
|||||||
<view class="mine">
|
<view class="mine">
|
||||||
<view class="mine-top">
|
<view class="mine-top">
|
||||||
<view class="top">
|
<view class="top">
|
||||||
<u-avatar @click="toOtherPage('/mine/MineInfo')" :src="userInfo.member_avatar + '?' + new Date().getTime()" :size="110"></u-avatar>
|
<u-avatar @click="toOtherPage('/mine/MineInfo')" :src="userInfo.member_avatar" :size="110"></u-avatar>
|
||||||
<view class="user-info">
|
<view class="user-info">
|
||||||
<!-- <view class="info-left">
|
|
||||||
<view class="user-nickname u-line-1">{{ userInfo.member_nickname }}</view>
|
|
||||||
<view class="user-medal" @click="toOtherPage('/mine/MedalIntroduction')">
|
|
||||||
<image src="/static/image/mine/13.png"></image>
|
|
||||||
<view class="rank-title">{{ userInfo.member_grade_name }}</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="info-right">
|
|
||||||
<view class="info-phone">{{ userInfo.member_mobile | phoneFormat }}</view>
|
|
||||||
<view class="user-rank">等级:{{ userInfo.member_level || 0 }}级</view>
|
|
||||||
</view> -->
|
|
||||||
<view class="info-top">
|
<view class="info-top">
|
||||||
<view class="user-nickname u-line-1">{{ userInfo.member_nickname }}</view>
|
<view class="user-nickname u-line-1">{{ userInfo.member_nickname }}</view>
|
||||||
<view class="info-phone">{{ userInfo.member_mobile | phoneFormat }}</view>
|
<view class="info-phone">{{ userInfo.member_mobile | phoneFormat }}</view>
|
||||||
@@ -62,33 +51,12 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<view @click="toOtherPage('/order/Index?current=1')">
|
<view v-for="(item, index) in orderList" :key="index" @click="toOtherPage(item.link)">
|
||||||
<image src="/static/image/mine/6.png"></image>
|
<image :src="item.img"></image>
|
||||||
<view>待支付</view>
|
<view>{{ item.title }}</view>
|
||||||
|
<view class="order-num" v-if="item.number">
|
||||||
|
<text>{{ item.number }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view @click="toOtherPage('/order/Index?current=2')">
|
|
||||||
<image src="/static/image/mine/35.png"></image>
|
|
||||||
<view>待发货</view>
|
|
||||||
</view>
|
|
||||||
<view @click="toOtherPage('/order/Index?current=3')">
|
|
||||||
<image src="/static/image/mine/2.png"></image>
|
|
||||||
<view>待收货</view>
|
|
||||||
</view>
|
|
||||||
<view @click="toOtherPage('/order/Index?current=4')">
|
|
||||||
<image src="/static/image/mine/1.png"></image>
|
|
||||||
<view>试穿试送</view>
|
|
||||||
</view>
|
|
||||||
<view @click="toOtherPage('/order/Index?current=5')">
|
|
||||||
<image src="/static/image/mine/37.png"></image>
|
|
||||||
<view>拼团中</view>
|
|
||||||
</view>
|
|
||||||
<view @click="toOtherPage('/order/Index?current=6')">
|
|
||||||
<image src="/static/image/mine/3.png"></image>
|
|
||||||
<view>待评价</view>
|
|
||||||
</view>
|
|
||||||
<view @click="toOtherPage('/order/Index?current=7')">
|
|
||||||
<image src="/static/image/mine/9.png"></image>
|
|
||||||
<view>售后</view>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -111,6 +79,10 @@
|
|||||||
<image src="/static/image/mine/25.png"></image>
|
<image src="/static/image/mine/25.png"></image>
|
||||||
<view>优惠券</view>
|
<view>优惠券</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view @click="toOtherPage('/order/Index?current=4')">
|
||||||
|
<image src="/static/image/mine/39.png"></image>
|
||||||
|
<view>试穿试送</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="more-tool">
|
<view class="more-tool">
|
||||||
@@ -132,6 +104,7 @@
|
|||||||
<image src="/static/image/mine/15.png"></image>
|
<image src="/static/image/mine/15.png"></image>
|
||||||
<view>投诉意见</view>
|
<view>投诉意见</view>
|
||||||
</view>
|
</view>
|
||||||
|
<!-- <view></view> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -147,6 +120,50 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
userInfo: {},
|
userInfo: {},
|
||||||
|
orderList: [
|
||||||
|
{
|
||||||
|
name: 'wait_pay',
|
||||||
|
title: '待支付',
|
||||||
|
img: '/static/image/mine/6.png',
|
||||||
|
link: '/order/Index?current=1',
|
||||||
|
number: '',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'already_pay',
|
||||||
|
title: '待发货',
|
||||||
|
img: '/static/image/mine/35.png',
|
||||||
|
link: '/order/Index?current=2',
|
||||||
|
number: '',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'wait_receipt',
|
||||||
|
title: '待收货',
|
||||||
|
img: '/static/image/mine/2.png',
|
||||||
|
link: '/order/Index?current=3',
|
||||||
|
number: '',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'pintuan',
|
||||||
|
title: '拼团中',
|
||||||
|
img: '/static/image/mine/37.png',
|
||||||
|
link: '/order/Index?current=5',
|
||||||
|
number: '',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'wait_evaluation',
|
||||||
|
title: '待评价',
|
||||||
|
img: '/static/image/mine/3.png',
|
||||||
|
link: '/order/Index?current=6',
|
||||||
|
number: '',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'refund',
|
||||||
|
title: '售后',
|
||||||
|
img: '/static/image/mine/9.png',
|
||||||
|
link: '/order/Index?current=7',
|
||||||
|
number: '',
|
||||||
|
},
|
||||||
|
]
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
filters: {
|
filters: {
|
||||||
@@ -160,11 +177,14 @@ export default {
|
|||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "../../pageA/login/login"
|
url: "../../pageA/login/login"
|
||||||
})
|
})
|
||||||
}
|
} else {
|
||||||
|
this.getOrderNumber();
|
||||||
this.getUserInfo();
|
this.getUserInfo();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
onNavigationBarButtonTap() {
|
onNavigationBarButtonTap(e) {
|
||||||
this.toOtherPage("/setting/Index");
|
// console.log(e);
|
||||||
|
if(e.index == 0) this.$u.route('/pageE/setting/Index');
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getUserInfo() {
|
getUserInfo() {
|
||||||
@@ -176,7 +196,22 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
getOrderNumber() {
|
||||||
|
this.$u.api.getOrderNumber().then(res => {
|
||||||
|
const object = res.data;
|
||||||
|
for (const key in object) {
|
||||||
|
if (object.hasOwnProperty(key)) {
|
||||||
|
let element = object[key];
|
||||||
|
const order = this.orderList.filter(item => item.name == key);
|
||||||
|
if(element > 99) element = "99+";
|
||||||
|
this.$set(order[0], 'number', element);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// console.log(this.orderList);
|
||||||
|
})
|
||||||
|
},
|
||||||
toOtherPage(url) {
|
toOtherPage(url) {
|
||||||
|
// console.log(url);
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pageE' + url
|
url: '/pageE' + url
|
||||||
});
|
});
|
||||||
@@ -200,45 +235,6 @@ export default {
|
|||||||
.user-info {
|
.user-info {
|
||||||
margin-left: 30rpx;
|
margin-left: 30rpx;
|
||||||
// display: flex;
|
// display: flex;
|
||||||
.info-left {
|
|
||||||
margin-right: 15rpx;
|
|
||||||
.user-nickname {
|
|
||||||
max-width: 200rpx;
|
|
||||||
font-size: 30rpx;
|
|
||||||
color: rgba(51,51,51,1);
|
|
||||||
margin-bottom: 19rpx;
|
|
||||||
}
|
|
||||||
.user-medal {
|
|
||||||
display: flex;
|
|
||||||
width: 110rpx;
|
|
||||||
// height: 25rpx;
|
|
||||||
background: linear-gradient(269deg,rgba(175,175,175,1) 0%,rgba(224,224,224,1) 100%);
|
|
||||||
border-radius: 13rpx;
|
|
||||||
align-items: center;
|
|
||||||
padding: 0 17rpx 0 10rpx;
|
|
||||||
> image {
|
|
||||||
margin-right: 9rpx;
|
|
||||||
width: 20rpx;
|
|
||||||
height: 22rpx;
|
|
||||||
flex-shrink: 0;
|
|
||||||
}
|
|
||||||
.rank-title {
|
|
||||||
font-size: 16rpx;
|
|
||||||
color: rgba(51,51,51,1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.info-right {
|
|
||||||
.info-phone {
|
|
||||||
font-size: 24rpx;
|
|
||||||
color: rgba(51,51,51,1);
|
|
||||||
margin-bottom: 26rpx;
|
|
||||||
}
|
|
||||||
.user-rank {
|
|
||||||
font-size: 24rpx;
|
|
||||||
color: rgba(51,51,51,1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.info-top {
|
.info-top {
|
||||||
height: 30rpx;
|
height: 30rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -322,7 +318,7 @@ export default {
|
|||||||
height: $image-height !important;
|
height: $image-height !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@mixin common-mine($content-padding-top, $content-padding-bottom, $image-width, $image-height) {
|
@mixin common-mine($content-padding-top, $content-padding-row, $content-padding-bottom, $image-width, $image-height) {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
width: 710rpx;
|
width: 710rpx;
|
||||||
background: rgba(255,255,255,1);
|
background: rgba(255,255,255,1);
|
||||||
@@ -336,23 +332,13 @@ export default {
|
|||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #666;
|
color: #666;
|
||||||
border-bottom: 1px solid #ececec;
|
border-bottom: 1px solid #ececec;
|
||||||
// &::after {
|
|
||||||
// content: "";
|
|
||||||
// position: absolute;
|
|
||||||
// width: 650rpx;
|
|
||||||
// height: 1rpx;
|
|
||||||
// background: rgba(234,234,234,1);
|
|
||||||
// bottom: 0;
|
|
||||||
// left: 50%;
|
|
||||||
// transform: translate(-50%,0);
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
.title-text-more {
|
.title-text-more {
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
color: #999;
|
color: #999;
|
||||||
}
|
}
|
||||||
.content {
|
.content {
|
||||||
padding: $content-padding-top 20rpx $content-padding-bottom;
|
padding: $content-padding-top $content-padding-row $content-padding-bottom;
|
||||||
display: flex;
|
display: flex;
|
||||||
> view {
|
> view {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
@@ -372,6 +358,7 @@ export default {
|
|||||||
.order {
|
.order {
|
||||||
@include common-mine(
|
@include common-mine(
|
||||||
$content-padding-top: 22rpx,
|
$content-padding-top: 22rpx,
|
||||||
|
$content-padding-row: 30rpx,
|
||||||
$content-padding-bottom: 30rpx,
|
$content-padding-bottom: 30rpx,
|
||||||
$image-height: 36rpx,
|
$image-height: 36rpx,
|
||||||
$image-width: 36rpx
|
$image-width: 36rpx
|
||||||
@@ -397,50 +384,86 @@ export default {
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
position: relative;
|
||||||
|
.order-num {
|
||||||
|
position: absolute;
|
||||||
|
top: -14rpx;
|
||||||
|
}
|
||||||
|
.order-num > text {
|
||||||
|
z-index: 9;
|
||||||
|
float: left;
|
||||||
|
border: 1rpx solid #FF7807;
|
||||||
|
height: 24rpx;
|
||||||
|
border-radius: 12rpx;
|
||||||
|
padding: 6rpx 8rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
color: #FF7807;
|
||||||
|
background-color: #ffffff;
|
||||||
|
font-size: 18rpx;
|
||||||
|
color:rgba(255,120,15,1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
> view:not(:nth-child(6)) {
|
||||||
|
.order-num {
|
||||||
|
left: 40rpx;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
> view:nth-child(1){
|
> view:nth-child(1){
|
||||||
@include image-size($image-width: 36rpx, $image-height: 34rpx);
|
@include image-size($image-width: 33rpx, $image-height: 36rpx);
|
||||||
}
|
}
|
||||||
> view:nth-child(2){
|
> view:nth-child(2){
|
||||||
@include image-size($image-width: 38rpx, $image-height: 36rpx);
|
@include image-size($image-width: 38rpx, $image-height: 32rpx);
|
||||||
}
|
}
|
||||||
> view:nth-child(3){
|
> view:nth-child(3){
|
||||||
@include image-size($image-width: 40rpx, $image-height: 36rpx);
|
@include image-size($image-width: 41rpx, $image-height: 33rpx);
|
||||||
}
|
}
|
||||||
> view:nth-child(4){
|
> view:nth-child(4){
|
||||||
@include image-size($image-width: 38rpx, $image-height: 38rpx);
|
@include image-size($image-width: 35rpx, $image-height: 35rpx);
|
||||||
}
|
}
|
||||||
> view:nth-child(5){
|
> view:nth-child(5){
|
||||||
@include image-size($image-width: 36rpx, $image-height: 40rpx);
|
@include image-size($image-width: 35rpx, $image-height: 35rpx);
|
||||||
}
|
}
|
||||||
> view:nth-child(6){
|
> view:nth-child(6){
|
||||||
@include image-size($image-width: 36rpx, $image-height: 40rpx);
|
@include image-size($image-width: 33rpx, $image-height: 35rpx);
|
||||||
|
.order-num {
|
||||||
|
left: 24rpx;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.tool {
|
.tool {
|
||||||
@include common-mine(
|
@include common-mine(
|
||||||
$content-padding-top: 24rpx,
|
$content-padding-top: 24rpx,
|
||||||
|
$content-padding-row: 20rpx,
|
||||||
$content-padding-bottom: 25rpx,
|
$content-padding-bottom: 25rpx,
|
||||||
$image-height: 71rpx,
|
$image-height: 71rpx,
|
||||||
$image-width: 71rpx
|
$image-width: 71rpx
|
||||||
);
|
);
|
||||||
.content {
|
.content {
|
||||||
|
> view {
|
||||||
|
width: 100rpx;
|
||||||
|
}
|
||||||
> view:not(:last-child) {
|
> view:not(:last-child) {
|
||||||
margin-right: 58rpx;
|
margin-right: 36rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.more-tool {
|
.more-tool {
|
||||||
@include common-mine(
|
@include common-mine(
|
||||||
$content-padding-top: 24rpx,
|
$content-padding-top: 24rpx,
|
||||||
|
$content-padding-row: 20rpx,
|
||||||
$content-padding-bottom: 48rpx,
|
$content-padding-bottom: 48rpx,
|
||||||
$image-height: 71rpx,
|
$image-height: 71rpx,
|
||||||
$image-width: 71rpx
|
$image-width: 71rpx
|
||||||
);
|
);
|
||||||
.content {
|
.content {
|
||||||
|
> view {
|
||||||
|
width: 100rpx;
|
||||||
|
}
|
||||||
> view:not(:last-child) {
|
> view:not(:last-child) {
|
||||||
margin-right: 46rpx;
|
margin-right: 36rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,7 +46,7 @@
|
|||||||
<!-- 拼团列表 -->
|
<!-- 拼团列表 -->
|
||||||
<group></group>
|
<group></group>
|
||||||
<view class="activity-view">
|
<view class="activity-view">
|
||||||
<image class="lingquan" :src="activityInfo.adv_code" @click="activityLink({ type: activityInfo.url_type, id: activityInfo.info_id })"></image>
|
<image class="lingquan" :src="activityInfo.adv_code" @click="jumpPage({ type: activityInfo.url_type, id: activityInfo.info_id })"></image>
|
||||||
</view>
|
</view>
|
||||||
<!-- 优惠券 -->
|
<!-- 优惠券 -->
|
||||||
<youhq></youhq>
|
<youhq></youhq>
|
||||||
@@ -56,11 +56,12 @@
|
|||||||
<view class="cart" @click="toCartPage">
|
<view class="cart" @click="toCartPage">
|
||||||
<image src="/static/image/common/3.png"></image>
|
<image src="/static/image/common/3.png"></image>
|
||||||
</view>
|
</view>
|
||||||
<u-picker mode="selector" :range="areaList" v-model="chooseArea" range-key="area_name" @confirm="setArea"></u-picker>
|
<u-picker mode="region" v-model="chooseArea" @confirm="setArea"></u-picker>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
import common from '@/static/js/common.js';
|
||||||
import shopitem from "@/components/shop/shop-item/index";
|
import shopitem from "@/components/shop/shop-item/index";
|
||||||
import recommend from "@/components/shop/recommend/index";
|
import recommend from "@/components/shop/recommend/index";
|
||||||
import pintuan from "@/components/shop/recommend/pintuan";
|
import pintuan from "@/components/shop/recommend/pintuan";
|
||||||
@@ -124,8 +125,8 @@
|
|||||||
type: 'wgs84',
|
type: 'wgs84',
|
||||||
geocode: true,
|
geocode: true,
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
// console.log(res.address);
|
console.log(res.address);
|
||||||
this.area = res.address.city;
|
this.area = res.address.district;
|
||||||
},
|
},
|
||||||
fail: (e) => {
|
fail: (e) => {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
@@ -190,38 +191,18 @@
|
|||||||
clickImage(index) {
|
clickImage(index) {
|
||||||
// console.log(this.list[index]);
|
// console.log(this.list[index]);
|
||||||
let item = this.list[index];
|
let item = this.list[index];
|
||||||
this.activityLink({
|
this.jumpPage({
|
||||||
type: item.url_type,
|
type: item.url_type,
|
||||||
id: item.info_id,
|
id: item.info_id,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
activityLink({
|
|
||||||
type,
|
|
||||||
id
|
|
||||||
}) {
|
|
||||||
console.log(type,id);
|
|
||||||
if (type == 0) return false;
|
|
||||||
// type 1 商品详情页, 2 店铺详情页
|
|
||||||
const url = type == 1 ? 'pageB/sdetails/index' : 'pageC/merchant/index';
|
|
||||||
let params = {
|
|
||||||
id: id
|
|
||||||
};
|
|
||||||
// type: 1 // 商品详情 1普通 2拼团 3秒杀 4优惠券
|
|
||||||
if (type == 1) Object.assign(params, {
|
|
||||||
type: 1
|
|
||||||
});
|
|
||||||
this.$u.route({
|
|
||||||
url: url,
|
|
||||||
params: params
|
|
||||||
})
|
|
||||||
},
|
|
||||||
// 下拉加载更多推荐商品
|
// 下拉加载更多推荐商品
|
||||||
onreachBottom() {
|
onreachBottom() {
|
||||||
this.$refs.recommendGoods.loadMore();
|
this.$refs.recommendGoods.loadMore();
|
||||||
},
|
},
|
||||||
setArea(e) {
|
setArea(e) {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
this.area = this.areaList[e[0]].area_name;
|
this.area = e.area.label;
|
||||||
},
|
},
|
||||||
toCartPage() {
|
toCartPage() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
@@ -240,28 +221,19 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
activityLink({ type, id }) {
|
jumpPage(uri) {
|
||||||
if(type == 0 || type == 2) return false;
|
// console.log(uri);
|
||||||
// type 1 商品详情页, 2 店铺详情页
|
common.jumpPage({ type: uri.type, id: uri.id });
|
||||||
const url = type == 1 ? 'pageB/sdetails/index' : '';
|
}
|
||||||
let params = { id: id };
|
|
||||||
// type: 1 // 商品详情 1普通 2拼团 3秒杀 4优惠券
|
|
||||||
if(type == 1) Object.assign(params, { type: 1 });
|
|
||||||
this.$u.route({
|
|
||||||
url: url,
|
|
||||||
params: params
|
|
||||||
})
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.shop {
|
.shop {
|
||||||
height: calc(100% - var(--window-top));
|
height: calc(100vh - var(--window-top));
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
background-color: #F0EDF1;
|
background-color: #F0EDF1;
|
||||||
overflow-y: scroll;
|
overflow-y: scroll;
|
||||||
|
|
||||||
.top {
|
.top {
|
||||||
padding: 0 30rpx;
|
padding: 0 30rpx;
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
|
|||||||
@@ -370,7 +370,7 @@ export default {
|
|||||||
const token = uni.getStorageSync('token');
|
const token = uni.getStorageSync('token');
|
||||||
console.log(token,that.id)
|
console.log(token,that.id)
|
||||||
uni.request({
|
uni.request({
|
||||||
url:"https://dmmall.sdbairui.com/api/Specialci/goodsShelves",
|
url:"https://mall.dmygkeji.com/api/Specialci/goodsShelves",
|
||||||
data:{
|
data:{
|
||||||
live_id:that.id
|
live_id:that.id
|
||||||
},
|
},
|
||||||
@@ -385,7 +385,7 @@ export default {
|
|||||||
})
|
})
|
||||||
setInterval(function(){
|
setInterval(function(){
|
||||||
uni.request({
|
uni.request({
|
||||||
url:"https://dmmall.sdbairui.com/api/Specialci/goodsShelves",
|
url:"https://mall.dmygkeji.com/api/Specialci/goodsShelves",
|
||||||
data:{
|
data:{
|
||||||
live_id:that.id
|
live_id:that.id
|
||||||
},
|
},
|
||||||
@@ -403,7 +403,7 @@ export default {
|
|||||||
|
|
||||||
},10 * 1000)
|
},10 * 1000)
|
||||||
uni.request({
|
uni.request({
|
||||||
url:"https://dmmall.sdbairui.com/api/Specialci/livingUserInfo",
|
url:"https://mall.dmygkeji.com/api/Specialci/livingUserInfo",
|
||||||
data:{
|
data:{
|
||||||
live_id:that.id
|
live_id:that.id
|
||||||
},
|
},
|
||||||
@@ -417,32 +417,13 @@ export default {
|
|||||||
// that.list= res.data.data
|
// that.list= res.data.data
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
//当前用户
|
|
||||||
var currentUser = {}
|
|
||||||
if(this.$store.state.hasLogin){
|
|
||||||
const user = uni.getStorageSync('user_info');
|
|
||||||
currentUser = {
|
|
||||||
id : user.member.member_id,
|
|
||||||
nickname : user.member.member_nickname,
|
|
||||||
avatar: user.member.member_avatar
|
|
||||||
};
|
|
||||||
}else{
|
|
||||||
const user = uni.getStorageSync('morenimg');
|
|
||||||
currentUser = {
|
|
||||||
id : new Date().getTime(),
|
|
||||||
nickname : "123",
|
|
||||||
avatar: user
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
var room = {
|
var room = {
|
||||||
id : a.rid + "",
|
id : a.rid + "",
|
||||||
name : a.rid + ""
|
name : a.rid + ""
|
||||||
};
|
};
|
||||||
that.chatRoomService = getApp().globalData.im
|
that.chatRoomService = getApp().globalData.im
|
||||||
console.log(room,currentUser)
|
|
||||||
//构造chatRoomService
|
//构造chatRoomService
|
||||||
that.chatRoomService.subscribeRoomMessage(room,currentUser)
|
that.chatRoomService.subscribeRoomMessage(room)
|
||||||
//获取当前聊天室数据
|
//获取当前聊天室数据
|
||||||
that.room = that.chatRoomService.room;
|
that.room = that.chatRoomService.room;
|
||||||
that.chatRoomService.initialWhenOnlineUserChange(that.newpeople)
|
that.chatRoomService.initialWhenOnlineUserChange(that.newpeople)
|
||||||
@@ -508,11 +489,19 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
guanzhu(){
|
guanzhu(){
|
||||||
|
if(!this.$store.state.hasLogin){
|
||||||
|
uni.showToast({
|
||||||
|
title: '请先登录',
|
||||||
|
duration: 2000,
|
||||||
|
icon:"none"
|
||||||
|
});
|
||||||
|
return ;
|
||||||
|
}
|
||||||
const token = uni.getStorageSync('token');
|
const token = uni.getStorageSync('token');
|
||||||
let that = this
|
let that = this
|
||||||
console.log(token)
|
console.log(token)
|
||||||
uni.request({
|
uni.request({
|
||||||
url:"https://dmmall.sdbairui.com/api/member/attentionMember",
|
url:"https://mall.dmygkeji.com/api/member/attentionMember",
|
||||||
data:{
|
data:{
|
||||||
member_id:that.info.user_id
|
member_id:that.info.user_id
|
||||||
},
|
},
|
||||||
@@ -523,7 +512,7 @@ export default {
|
|||||||
success(res){
|
success(res){
|
||||||
console.log(res)
|
console.log(res)
|
||||||
uni.request({
|
uni.request({
|
||||||
url:"https://dmmall.sdbairui.com/api/Specialci/livingUserInfo",
|
url:"https://mall.dmygkeji.com/api/Specialci/livingUserInfo",
|
||||||
data:{
|
data:{
|
||||||
live_id:that.id
|
live_id:that.id
|
||||||
},
|
},
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 2.5 KiB |
2
static/goeasy-im-1.1.1.js
Normal file
BIN
static/image/clons.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
static/image/common/31.png
Normal file
|
After Width: | Height: | Size: 31 KiB |
BIN
static/image/common/32.png
Normal file
|
After Width: | Height: | Size: 4.9 KiB |
BIN
static/image/mine/39.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
static/image/mine/40.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 6.3 KiB |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 7.3 KiB |
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 22 KiB |
@@ -6,6 +6,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import GoEasyIM from './goeasy-im-1.0.9';
|
import GoEasyIM from './goeasy-im-1.0.9';
|
||||||
|
// import GoEasyIM from './goeasy-im-1.1.1';
|
||||||
import restApi from './restapi';
|
import restApi from './restapi';
|
||||||
|
|
||||||
function Friend(uuid, name, avatar,time = "", text = "",date = "",unReadMessage = 0) {
|
function Friend(uuid, name, avatar,time = "", text = "",date = "",unReadMessage = 0) {
|
||||||
@@ -38,6 +39,7 @@ function IMService() {
|
|||||||
appkey:'BC-453aa755c4ea48148abefc55a86df283'
|
appkey:'BC-453aa755c4ea48148abefc55a86df283'
|
||||||
});
|
});
|
||||||
this.status = false
|
this.status = false
|
||||||
|
this.lianjie = false
|
||||||
//当前“我”
|
//当前“我”
|
||||||
this.currentUser = null;
|
this.currentUser = null;
|
||||||
//我的好友
|
//我的好友
|
||||||
@@ -84,6 +86,7 @@ function IMService() {
|
|||||||
IMService.prototype.login = function (uuid, name, avatar) {
|
IMService.prototype.login = function (uuid, name, avatar) {
|
||||||
//初始化当前用户
|
//初始化当前用户
|
||||||
this.currentUser = new CurrentUser(uuid, name, avatar);
|
this.currentUser = new CurrentUser(uuid, name, avatar);
|
||||||
|
|
||||||
//初始化联系人信息,包括群
|
//初始化联系人信息,包括群
|
||||||
this.initialContacts();
|
this.initialContacts();
|
||||||
return true;
|
return true;
|
||||||
@@ -105,7 +108,7 @@ IMService.prototype.initialContacts = function (friendList) {
|
|||||||
const token = uni.getStorageSync('token');
|
const token = uni.getStorageSync('token');
|
||||||
console.log(token)
|
console.log(token)
|
||||||
uni.request({
|
uni.request({
|
||||||
url:"https://dmmall.sdbairui.com/api/Specialci/getAtwillUserInfo",
|
url:"https://mall.dmygkeji.com/api/Specialci/getAtwillUserInfo",
|
||||||
data:{
|
data:{
|
||||||
userId:i[0],
|
userId:i[0],
|
||||||
markup:1
|
markup:1
|
||||||
@@ -120,7 +123,7 @@ IMService.prototype.initialContacts = function (friendList) {
|
|||||||
console.log(that.friends)
|
console.log(that.friends)
|
||||||
let sorts = function (friends){
|
let sorts = function (friends){
|
||||||
let paixu = function (a,b){
|
let paixu = function (a,b){
|
||||||
if(a.date > b.date){
|
if(a.date > b.date && b.unReadMessage == 0){
|
||||||
return 0;
|
return 0;
|
||||||
}else{
|
}else{
|
||||||
return 1;
|
return 1;
|
||||||
@@ -203,6 +206,7 @@ IMService.prototype.resetFriendUnReadMessage = function (friend) {
|
|||||||
//连接GoEasy
|
//连接GoEasy
|
||||||
IMService.prototype.connectIM = function () {
|
IMService.prototype.connectIM = function () {
|
||||||
//初始化IM相关的监听器
|
//初始化IM相关的监听器
|
||||||
|
|
||||||
try {
|
try {
|
||||||
this.initialIMListeners();
|
this.initialIMListeners();
|
||||||
|
|
||||||
@@ -210,6 +214,7 @@ IMService.prototype.connectIM = function () {
|
|||||||
console.log(123)
|
console.log(123)
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
|
console.log(this.currentUser)
|
||||||
this.im.connect({
|
this.im.connect({
|
||||||
id: this.currentUser.uuid,
|
id: this.currentUser.uuid,
|
||||||
data: {
|
data: {
|
||||||
@@ -226,7 +231,6 @@ IMService.prototype.connectIM = function () {
|
|||||||
this.subscribeFriendsPresence();
|
this.subscribeFriendsPresence();
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
console.log('连接失败,请确保网络正常,appkey和host正确,code:' + error.code + " content:" + error.content);
|
console.log('连接失败,请确保网络正常,appkey和host正确,code:' + error.code + " content:" + error.content);
|
||||||
this.connectIM()
|
|
||||||
});
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(12323)
|
console.log(12323)
|
||||||
@@ -244,6 +248,7 @@ IMService.prototype.initialIMListeners = function () {
|
|||||||
this.im.on(GoEasyIM.EVENT.DISCONNECTED, () => {
|
this.im.on(GoEasyIM.EVENT.DISCONNECTED, () => {
|
||||||
console.log('连接断开.')
|
console.log('连接断开.')
|
||||||
this.status = false
|
this.status = false
|
||||||
|
this.lianjie = false
|
||||||
});
|
});
|
||||||
|
|
||||||
//监听好友上下线
|
//监听好友上下线
|
||||||
@@ -268,7 +273,7 @@ IMService.prototype.initialIMListeners = function () {
|
|||||||
// return ;
|
// return ;
|
||||||
let sorts = function (friends){
|
let sorts = function (friends){
|
||||||
let paixu = function (a,b){
|
let paixu = function (a,b){
|
||||||
if(a.date > b.date){
|
if(a.date > b.date && b.unReadMessage == 0){
|
||||||
return 0;
|
return 0;
|
||||||
}else{
|
}else{
|
||||||
return 1;
|
return 1;
|
||||||
@@ -284,7 +289,7 @@ IMService.prototype.initialIMListeners = function () {
|
|||||||
const token = uni.getStorageSync('token');
|
const token = uni.getStorageSync('token');
|
||||||
console.log(token)
|
console.log(token)
|
||||||
uni.request({
|
uni.request({
|
||||||
url:"https://dmmall.sdbairui.com/api/Specialci/getAtwillUserInfo",
|
url:"https://mall.dmygkeji.com/api/Specialci/getAtwillUserInfo",
|
||||||
data:{
|
data:{
|
||||||
userId:message.senderId,
|
userId:message.senderId,
|
||||||
markup:1
|
markup:1
|
||||||
@@ -511,7 +516,7 @@ IMService.prototype.sendMessagesSetStorage = function (friendId,message){
|
|||||||
// return ;
|
// return ;
|
||||||
let sorts = function (friends){
|
let sorts = function (friends){
|
||||||
let paixu = function (a,b){
|
let paixu = function (a,b){
|
||||||
if(a.date > b.date){
|
if(a.date > b.date && b.unReadMessage == 0){
|
||||||
return 0;
|
return 0;
|
||||||
}else{
|
}else{
|
||||||
return 1;
|
return 1;
|
||||||
@@ -527,7 +532,7 @@ IMService.prototype.sendMessagesSetStorage = function (friendId,message){
|
|||||||
const token = uni.getStorageSync('token');
|
const token = uni.getStorageSync('token');
|
||||||
console.log(token)
|
console.log(token)
|
||||||
uni.request({
|
uni.request({
|
||||||
url:"https://dmmall.sdbairui.com/api/Specialci/getAtwillUserInfo",
|
url:"https://mall.dmygkeji.com/api/Specialci/getAtwillUserInfo",
|
||||||
data:{
|
data:{
|
||||||
userId:friendId,
|
userId:friendId,
|
||||||
markup:1
|
markup:1
|
||||||
@@ -831,7 +836,7 @@ IMService.prototype.listenerGroupPresence = function () {
|
|||||||
//查询和初始化在线用户列表和在线用户数
|
//查询和初始化在线用户列表和在线用户数
|
||||||
IMService.prototype.initialOnlineUsers = function (roomId) {
|
IMService.prototype.initialOnlineUsers = function (roomId) {
|
||||||
let self = this;
|
let self = this;
|
||||||
|
console.log(roomId)
|
||||||
//查询最新上线的用户列表
|
//查询最新上线的用户列表
|
||||||
this.im.groupHereNow(roomId)
|
this.im.groupHereNow(roomId)
|
||||||
.then(result => {
|
.then(result => {
|
||||||
@@ -850,7 +855,7 @@ IMService.prototype.initialOnlineUsers = function (roomId) {
|
|||||||
if (e.code == 401) {
|
if (e.code == 401) {
|
||||||
console.log("您还没有开通用户在线状态提醒,登录goeasy->我的应用->查看详情->高级功能,自助开通.");
|
console.log("您还没有开通用户在线状态提醒,登录goeasy->我的应用->查看详情->高级功能,自助开通.");
|
||||||
} else {
|
} else {
|
||||||
console.log(e);
|
console.log(e,1212);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
//获取聊天室在线用户数
|
//获取聊天室在线用户数
|
||||||
@@ -873,7 +878,12 @@ IMService.prototype.subscribePresence = function (roomId) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//订阅聊天室消息
|
//订阅聊天室消息
|
||||||
IMService.prototype.subscribeRoomMessage = function (room, user) {
|
IMService.prototype.subscribeRoomMessage = function (room) {
|
||||||
|
let user = {
|
||||||
|
id:this.currentUser.uuid,
|
||||||
|
nickname:this.currentUser.name,
|
||||||
|
avatar:this.currentUser.avatar
|
||||||
|
}
|
||||||
this.room = new Room(room.id, room.name, user);
|
this.room = new Room(room.id, room.name, user);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -67,5 +67,29 @@ const common = {
|
|||||||
else result = hours + ':' + minutes + ':' + seconds;
|
else result = hours + ':' + minutes + ':' + seconds;
|
||||||
return result;
|
return result;
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* 广告位跳转
|
||||||
|
* @param { String } type 跳转类型
|
||||||
|
* @param { String | Number } id 跳转id 商品id/商家id...
|
||||||
|
* @return { undefined } undefined
|
||||||
|
*/
|
||||||
|
jumpPage({ type, id }) {
|
||||||
|
let url;
|
||||||
|
switch (type) {
|
||||||
|
case 1:
|
||||||
|
url = '/pageB/sdetails/index?id=' + id;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
url = '/pageC/merchant/index?id=' + id;
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
url = '/pageE/mine/MemberServe?current=1'
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
export default common
|
// console.log(url);
|
||||||
|
uni.navigateTo({ url: url });
|
||||||
|
},
|
||||||
|
}
|
||||||
|
export default common;
|
||||||