Merge pull request 'gdpaoup2' (#104) from gyh into master
Reviewed-on: http://git.luyuan.tk/luyuan/deming/pulls/104
This commit is contained in:
commit
0ee518854c
@ -37,15 +37,21 @@
|
||||
<text>{{ item.member_nickname }}</text>
|
||||
<text class="time">{{ item.create_time }}</text>
|
||||
</view>
|
||||
<text class="reply" @click="openKeyInput(item)">回复</text>
|
||||
<text class="reply" @click="openKeyInput(item,index)">回复</text>
|
||||
</view>
|
||||
<view class="content">
|
||||
{{ item.content }}
|
||||
</view>
|
||||
<view class="child-content">
|
||||
<view>
|
||||
|
||||
</view>
|
||||
<view class="more-reply" v-if="item.reply_count">展开更多回复<u-icon name="arrow-down"></u-icon></view>
|
||||
</view>
|
||||
</block>
|
||||
<view class="no-data" v-else>111</view>
|
||||
</scroll-view>
|
||||
<view class="editing" @click="openKeyInput()">
|
||||
<view class="editing" @click="openKeyInput">
|
||||
<input type="text" value="" :placeholder="edit_text" disabled="disabled" />
|
||||
<text>发送</text>
|
||||
</view>
|
||||
@ -53,7 +59,7 @@
|
||||
<!-- 评论box -->
|
||||
<u-popup v-model="is_edit" mode="bottom" border-radius="10" height="100rpx">
|
||||
<view class="edit-box">
|
||||
<input type="text" :placeholder="edit_text" :focus="is_focus" @focus="focus" v-model="send_value">
|
||||
<input type="text" :placeholder="edit_text_other" :focus="is_focus" @focus="focus" v-model="send_value">
|
||||
<text @click="sendComment">发送</text>
|
||||
</view>
|
||||
</u-popup>
|
||||
@ -218,8 +224,14 @@
|
||||
}
|
||||
.content {
|
||||
padding: 0 20rpx 10rpx 90rpx;
|
||||
border-bottom: 1px solid #ececec;
|
||||
}
|
||||
.child-content {
|
||||
margin: 6rpx 90rpx 6rpx;
|
||||
.more-reply {
|
||||
font-size: 22rpx;
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
}
|
||||
.no-data {
|
||||
margin-top: 100rpx;
|
||||
@ -372,13 +384,28 @@ export default {
|
||||
cartList: [],
|
||||
cart_len: 0,
|
||||
edit_text: "有爱评论,说点好听的 ~",
|
||||
edit_text_other: "有爱评论,说点好听的 ~",
|
||||
commentList: [], // 评论
|
||||
allList: {}, // 全部子评论
|
||||
}
|
||||
},
|
||||
onLoad(option){
|
||||
this.article_id = option.id;
|
||||
this.articleInfo(this.article_id);
|
||||
},
|
||||
// 监听返回按钮
|
||||
onBackPress() {
|
||||
if (this.cart_type) {
|
||||
this.cart_type = !this.cart_type;
|
||||
} else if (this.is_comment) {
|
||||
this.is_comment = !this.is_comment;
|
||||
} else if (this.is_edit) {
|
||||
this.is_edit = !this.is_edit;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
methods:{
|
||||
// 发现详情
|
||||
articleInfo(article_id){
|
||||
@ -414,22 +441,39 @@ export default {
|
||||
})
|
||||
},
|
||||
// 打开评论输入
|
||||
openKeyInput(data) {
|
||||
openKeyInput(data,index) {
|
||||
console.log(data);
|
||||
this.is_edit = true;
|
||||
this.is_focus = true;
|
||||
this.comment_id = index;
|
||||
if (data.id) {
|
||||
this.edit_text_other = "回复@" + data.member_nickname;
|
||||
this.pid = data.id;
|
||||
this.reply_id = data.member_id;
|
||||
} else {
|
||||
this.edit_text_other = "有爱评论,说点好听的 ~";
|
||||
this.pid = "";
|
||||
this.reply_id = "";
|
||||
}
|
||||
// console.log(this.pid, this.edit_text_other);
|
||||
},
|
||||
// 发布评论
|
||||
sendComment(data) {
|
||||
sendComment() {
|
||||
this.$u.post("article/articleAddComment",{
|
||||
article_id: this.article_id,
|
||||
content: this.send_value,
|
||||
pid: data.id,
|
||||
reply_id: data.member_id,
|
||||
pid: this.pid,
|
||||
reply_id: this.reply_id,
|
||||
}).then(res => {
|
||||
console.log(res);
|
||||
// console.log(res.data.data);
|
||||
if (res.errCode == 0) {
|
||||
this.is_edit = false;
|
||||
if (res.data.data.pid) {
|
||||
this.commentList[this.comment_id].reply_count = true;
|
||||
this.allList[this.comment_id].unshift(res.data.data);
|
||||
} else {
|
||||
this.commentList.unshift(res.data.data);
|
||||
}
|
||||
} else {
|
||||
this.$u.toast(res.message);
|
||||
}
|
||||
|
@ -372,7 +372,7 @@ export default {
|
||||
if(type == 'involvement') {
|
||||
Object.assign(params, {
|
||||
pintuan_id: this.id,
|
||||
pintuangroup_id: this.involvemenGroupInfo[0].pintuangroup_id
|
||||
pintuangroup_id: this.involvemenGroupInfo[0].pintuangroup_id,
|
||||
})
|
||||
} else {
|
||||
const userId = uni.getStorageSync('user_info').member.member_id;
|
||||
|
@ -258,8 +258,10 @@ export default {
|
||||
type: 'redirect',
|
||||
url: '/pageC/cart/cashier',
|
||||
params: {
|
||||
ifcart: params.ifcart,
|
||||
pay_sn: res.data.pay_sn,
|
||||
price: res.data.order_total_amount,
|
||||
order_id: res.data.order_list[0].order_id,
|
||||
}
|
||||
})
|
||||
} else {
|
||||
|
@ -11,8 +11,8 @@
|
||||
<image :src="item.icon"></image>
|
||||
<text class="name">{{ item.pay_way }}</text>
|
||||
</view>
|
||||
<view class="radio-view" :class="pay_way == item.name ? 'active' : 'default'">
|
||||
<u-radio :name="item.name" active-color="#FF780F" :disabled="item.disabled"></u-radio>
|
||||
<view class="" :class="pay_way == item.name ? 'active' : 'default'">
|
||||
<u-radio class="radio-view" shape="circle" :name="item.name" active-color="#FF780F" :disabled="item.disabled"></u-radio>
|
||||
</view>
|
||||
</view>
|
||||
</u-radio-group>
|
||||
@ -39,13 +39,18 @@ export default {
|
||||
}
|
||||
],
|
||||
pay_way: 'wxpay_app',
|
||||
pay_sn: '',
|
||||
price: '',
|
||||
pay_sn: '',
|
||||
ifcart: '',
|
||||
order_id: '',
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
this.pay_sn = option.pay_sn;
|
||||
console.log(option);
|
||||
this.ifcart = option.ifcart;
|
||||
this.price = option.price;
|
||||
this.pay_sn = option.pay_sn;
|
||||
this.order_id = option.order_id;
|
||||
},
|
||||
methods: {
|
||||
radioGroupChange(e) {
|
||||
@ -55,14 +60,43 @@ export default {
|
||||
// uni.getProvider({service: 'payment'})
|
||||
// },
|
||||
payOrder(provider, orderInfo) {
|
||||
let me = this;
|
||||
uni.requestPayment({
|
||||
provider: provider,
|
||||
orderInfo: orderInfo, //订单数据
|
||||
success: function (res) {
|
||||
success: (res) => {
|
||||
console.log('success:' + JSON.stringify(res));
|
||||
this.$u.toast("支付成功!");
|
||||
setTimeout(function(){
|
||||
if (Boolean(parseInt(me.ifcart))) {
|
||||
me.$u.route({
|
||||
type: 'redirect',
|
||||
url: '/pageE/order/Index',
|
||||
})
|
||||
} else {
|
||||
me.$u.route({
|
||||
type: 'redirect',
|
||||
url: '/pageE/order/Details?oid=' + me.order_id,
|
||||
})
|
||||
}
|
||||
},2000)
|
||||
},
|
||||
fail: function (err) {
|
||||
fail: (err) => {
|
||||
console.log('fail:' + JSON.stringify(err));
|
||||
this.$u.toast("支付失败,支付已取消!");
|
||||
setTimeout(function(){
|
||||
if (Boolean(parseInt(me.ifcart))) {
|
||||
me.$u.route({
|
||||
type: 'redirect',
|
||||
url: '/pageE/order/Index',
|
||||
})
|
||||
} else {
|
||||
me.$u.route({
|
||||
type: 'redirect',
|
||||
url: '/pageE/order/Details?oid=' + me.order_id,
|
||||
})
|
||||
}
|
||||
},2000)
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -115,15 +149,18 @@ export default {
|
||||
/deep/ .u-radio-group {
|
||||
width: 100%;
|
||||
flex-direction: column;
|
||||
.u-radio__icon-wrap {
|
||||
width: 30rpx !important;
|
||||
height: 30rpx !important;
|
||||
padding: 4rpx;
|
||||
border: 1px solid #FF780F;
|
||||
}
|
||||
.active {
|
||||
}
|
||||
.default {
|
||||
}
|
||||
.radio-view {
|
||||
padding: 6rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.active {
|
||||
border: 2rpx solid rgba(255,120,15,1);
|
||||
}
|
||||
.default {
|
||||
border: 2rpx solid rgba(219,219,219,1);
|
||||
|
||||
}
|
||||
.u-radio {
|
||||
.u-icon {
|
||||
@ -135,13 +172,13 @@ export default {
|
||||
}
|
||||
}
|
||||
.pay-item {
|
||||
height: 98rpx;
|
||||
background: rgba(255,255,255,1);
|
||||
padding: 24rpx 30rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
height: 98rpx;
|
||||
padding: 24rpx 30rpx;
|
||||
margin-bottom: 2rpx;
|
||||
background: rgba(255,255,255,1);
|
||||
.pay-way {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
@ -235,9 +235,9 @@ export default {
|
||||
title = "订单详情"
|
||||
break;
|
||||
}
|
||||
uni.setNavigationBarTitle({
|
||||
title: title
|
||||
});
|
||||
// uni.setNavigationBarTitle({
|
||||
// title: title
|
||||
// });
|
||||
},
|
||||
payNow() {
|
||||
this.$u.route('/pageC/cart/cashier', {
|
||||
|
@ -2,7 +2,6 @@
|
||||
<view>
|
||||
<view class="status_bar"></view>
|
||||
<view class="index">
|
||||
<navigator url="/pageB/photo/index?id=28">bbb</navigator>
|
||||
<view class="top">
|
||||
<view class="sosuo"></view>
|
||||
<view class="tabs">
|
||||
@ -83,7 +82,6 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</scroll-view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
|
Loading…
Reference in New Issue
Block a user