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>{{ item.member_nickname }}</text>
 | 
				
			||||||
							<text class="time">{{ item.create_time }}</text>
 | 
												<text class="time">{{ item.create_time }}</text>
 | 
				
			||||||
						</view>
 | 
											</view>
 | 
				
			||||||
						<text class="reply" @click="openKeyInput(item)">回复</text>
 | 
											<text class="reply" @click="openKeyInput(item,index)">回复</text>
 | 
				
			||||||
					</view>
 | 
										</view>
 | 
				
			||||||
					<view class="content">
 | 
										<view class="content">
 | 
				
			||||||
						{{ item.content }}
 | 
											{{ item.content }}
 | 
				
			||||||
					</view>
 | 
										</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>
 | 
									</block>
 | 
				
			||||||
				<view class="no-data" v-else>111</view>
 | 
									<view class="no-data" v-else>111</view>
 | 
				
			||||||
			</scroll-view>
 | 
								</scroll-view>
 | 
				
			||||||
			<view class="editing" @click="openKeyInput()">
 | 
								<view class="editing" @click="openKeyInput">
 | 
				
			||||||
				<input type="text" value="" :placeholder="edit_text" disabled="disabled" />
 | 
									<input type="text" value="" :placeholder="edit_text" disabled="disabled" />
 | 
				
			||||||
				<text>发送</text>
 | 
									<text>发送</text>
 | 
				
			||||||
			</view>
 | 
								</view>
 | 
				
			||||||
@ -53,7 +59,7 @@
 | 
				
			|||||||
		<!-- 评论box -->
 | 
							<!-- 评论box -->
 | 
				
			||||||
		<u-popup v-model="is_edit" mode="bottom" border-radius="10" height="100rpx">
 | 
							<u-popup v-model="is_edit" mode="bottom" border-radius="10" height="100rpx">
 | 
				
			||||||
			<view class="edit-box">
 | 
								<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>
 | 
									<text @click="sendComment">发送</text>
 | 
				
			||||||
			</view>
 | 
								</view>
 | 
				
			||||||
		</u-popup>
 | 
							</u-popup>
 | 
				
			||||||
@ -218,8 +224,14 @@
 | 
				
			|||||||
			}
 | 
								}
 | 
				
			||||||
			.content {
 | 
								.content {
 | 
				
			||||||
				padding: 0 20rpx 10rpx 90rpx;
 | 
									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 {
 | 
							.no-data {
 | 
				
			||||||
			margin-top: 100rpx;
 | 
								margin-top: 100rpx;
 | 
				
			||||||
@ -372,13 +384,28 @@ export default {
 | 
				
			|||||||
			cartList: [],
 | 
								cartList: [],
 | 
				
			||||||
			cart_len: 0,
 | 
								cart_len: 0,
 | 
				
			||||||
			edit_text: "有爱评论,说点好听的 ~",
 | 
								edit_text: "有爱评论,说点好听的 ~",
 | 
				
			||||||
 | 
								edit_text_other: "有爱评论,说点好听的 ~",
 | 
				
			||||||
			commentList: [], // 评论
 | 
								commentList: [], // 评论
 | 
				
			||||||
 | 
					            allList: {}, // 全部子评论
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
	onLoad(option){
 | 
						onLoad(option){
 | 
				
			||||||
	    this.article_id = option.id;
 | 
						    this.article_id = option.id;
 | 
				
			||||||
	    this.articleInfo(this.article_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:{
 | 
					    methods:{
 | 
				
			||||||
		// 发现详情
 | 
							// 发现详情
 | 
				
			||||||
        articleInfo(article_id){
 | 
					        articleInfo(article_id){
 | 
				
			||||||
@ -414,22 +441,39 @@ export default {
 | 
				
			|||||||
			})
 | 
								})
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
		// 打开评论输入
 | 
							// 打开评论输入
 | 
				
			||||||
		openKeyInput(data) {
 | 
							openKeyInput(data,index) {
 | 
				
			||||||
			console.log(data);
 | 
								console.log(data);
 | 
				
			||||||
			this.is_edit = true;
 | 
								this.is_edit = true;
 | 
				
			||||||
			this.is_focus = 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",{
 | 
								this.$u.post("article/articleAddComment",{
 | 
				
			||||||
				article_id: this.article_id,
 | 
									article_id: this.article_id,
 | 
				
			||||||
				content: this.send_value,
 | 
									content: this.send_value,
 | 
				
			||||||
				pid: data.id,
 | 
									pid: this.pid,
 | 
				
			||||||
				reply_id: data.member_id,
 | 
									reply_id: this.reply_id,
 | 
				
			||||||
			}).then(res => {
 | 
								}).then(res => {
 | 
				
			||||||
				console.log(res);
 | 
									// console.log(res.data.data);
 | 
				
			||||||
				if (res.errCode == 0) {
 | 
									if (res.errCode == 0) {
 | 
				
			||||||
					this.is_edit = false;
 | 
										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 {
 | 
									} else {
 | 
				
			||||||
					this.$u.toast(res.message);
 | 
										this.$u.toast(res.message);
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
 | 
				
			|||||||
@ -372,7 +372,7 @@ export default {
 | 
				
			|||||||
				if(type == 'involvement') {
 | 
									if(type == 'involvement') {
 | 
				
			||||||
					Object.assign(params, {
 | 
										Object.assign(params, {
 | 
				
			||||||
						pintuan_id: this.id, 
 | 
											pintuan_id: this.id, 
 | 
				
			||||||
						pintuangroup_id: this.involvemenGroupInfo[0].pintuangroup_id 
 | 
											pintuangroup_id: this.involvemenGroupInfo[0].pintuangroup_id,
 | 
				
			||||||
					})
 | 
										})
 | 
				
			||||||
				} else {
 | 
									} else {
 | 
				
			||||||
					const userId = uni.getStorageSync('user_info').member.member_id;
 | 
										const userId = uni.getStorageSync('user_info').member.member_id;
 | 
				
			||||||
 | 
				
			|||||||
@ -258,8 +258,10 @@ export default {
 | 
				
			|||||||
						type: 'redirect',
 | 
											type: 'redirect',
 | 
				
			||||||
						url: '/pageC/cart/cashier',
 | 
											url: '/pageC/cart/cashier',
 | 
				
			||||||
						params: {
 | 
											params: {
 | 
				
			||||||
 | 
					                            ifcart: params.ifcart,
 | 
				
			||||||
							pay_sn: res.data.pay_sn,
 | 
												pay_sn: res.data.pay_sn,
 | 
				
			||||||
							price: res.data.order_total_amount,
 | 
												price: res.data.order_total_amount,
 | 
				
			||||||
 | 
					                            order_id: res.data.order_list[0].order_id,
 | 
				
			||||||
						}
 | 
											}
 | 
				
			||||||
					})
 | 
										})
 | 
				
			||||||
				} else {
 | 
									} else {
 | 
				
			||||||
 | 
				
			|||||||
@ -11,8 +11,8 @@
 | 
				
			|||||||
						<image :src="item.icon"></image>
 | 
											<image :src="item.icon"></image>
 | 
				
			||||||
						<text class="name">{{ item.pay_way }}</text>
 | 
											<text class="name">{{ item.pay_way }}</text>
 | 
				
			||||||
					</view>
 | 
										</view>
 | 
				
			||||||
					<view class="radio-view" :class="pay_way == item.name ? 'active' : 'default'">
 | 
										<view class="" :class="pay_way == item.name ? 'active' : 'default'">
 | 
				
			||||||
						<u-radio :name="item.name" active-color="#FF780F" :disabled="item.disabled"></u-radio>
 | 
					                        <u-radio class="radio-view" shape="circle" :name="item.name" active-color="#FF780F" :disabled="item.disabled"></u-radio>
 | 
				
			||||||
					</view>
 | 
										</view>
 | 
				
			||||||
				</view>
 | 
									</view>
 | 
				
			||||||
			</u-radio-group>
 | 
								</u-radio-group>
 | 
				
			||||||
@ -39,13 +39,18 @@ export default {
 | 
				
			|||||||
				}
 | 
									}
 | 
				
			||||||
			],
 | 
								],
 | 
				
			||||||
			pay_way: 'wxpay_app',
 | 
								pay_way: 'wxpay_app',
 | 
				
			||||||
			pay_sn: '',
 | 
					 | 
				
			||||||
			price: '',
 | 
								price: '',
 | 
				
			||||||
 | 
								pay_sn: '',
 | 
				
			||||||
 | 
					            ifcart: '',
 | 
				
			||||||
 | 
					            order_id: '',
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	onLoad(option) {
 | 
						onLoad(option) {
 | 
				
			||||||
		this.pay_sn = option.pay_sn;
 | 
					        console.log(option);
 | 
				
			||||||
 | 
					        this.ifcart = option.ifcart;
 | 
				
			||||||
		this.price = option.price;
 | 
							this.price = option.price;
 | 
				
			||||||
 | 
							this.pay_sn = option.pay_sn;
 | 
				
			||||||
 | 
					        this.order_id = option.order_id;
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	methods: {
 | 
						methods: {
 | 
				
			||||||
		radioGroupChange(e) {
 | 
							radioGroupChange(e) {
 | 
				
			||||||
@ -55,14 +60,43 @@ export default {
 | 
				
			|||||||
		// 	uni.getProvider({service: 'payment'})
 | 
							// 	uni.getProvider({service: 'payment'})
 | 
				
			||||||
		// },
 | 
							// },
 | 
				
			||||||
		payOrder(provider, orderInfo) {
 | 
							payOrder(provider, orderInfo) {
 | 
				
			||||||
 | 
					            let me = this;
 | 
				
			||||||
			uni.requestPayment({
 | 
								uni.requestPayment({
 | 
				
			||||||
				provider: provider,
 | 
									provider: provider,
 | 
				
			||||||
				orderInfo: orderInfo, //订单数据
 | 
									orderInfo: orderInfo, //订单数据
 | 
				
			||||||
				success: function (res) {
 | 
									success: (res) => {
 | 
				
			||||||
					console.log('success:' + JSON.stringify(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));
 | 
										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 {
 | 
							/deep/ .u-radio-group {
 | 
				
			||||||
			width: 100%;
 | 
								width: 100%;
 | 
				
			||||||
			flex-direction: column;
 | 
								flex-direction: column;
 | 
				
			||||||
 | 
					            .u-radio__icon-wrap {
 | 
				
			||||||
 | 
					                width: 30rpx !important;
 | 
				
			||||||
 | 
					                height: 30rpx !important;
 | 
				
			||||||
 | 
					                padding: 4rpx;
 | 
				
			||||||
 | 
					                border: 1px solid #FF780F;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            .active {
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            .default {
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
			.radio-view {
 | 
								.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-radio {
 | 
				
			||||||
				.u-icon {
 | 
									.u-icon {
 | 
				
			||||||
@ -135,13 +172,13 @@ export default {
 | 
				
			|||||||
				}
 | 
									}
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			.pay-item {
 | 
								.pay-item {
 | 
				
			||||||
				height: 98rpx;
 | 
					 | 
				
			||||||
				background: rgba(255,255,255,1);
 | 
					 | 
				
			||||||
				padding: 24rpx 30rpx;
 | 
					 | 
				
			||||||
				display: flex;
 | 
									display: flex;
 | 
				
			||||||
				align-items: center;
 | 
									align-items: center;
 | 
				
			||||||
				justify-content: space-between;
 | 
									justify-content: space-between;
 | 
				
			||||||
 | 
									height: 98rpx;
 | 
				
			||||||
 | 
									padding: 24rpx 30rpx;
 | 
				
			||||||
				margin-bottom: 2rpx;
 | 
									margin-bottom: 2rpx;
 | 
				
			||||||
 | 
									background: rgba(255,255,255,1);
 | 
				
			||||||
				.pay-way {
 | 
									.pay-way {
 | 
				
			||||||
					display: flex;
 | 
										display: flex;
 | 
				
			||||||
					align-items: center;
 | 
										align-items: center;
 | 
				
			||||||
 | 
				
			|||||||
@ -235,9 +235,9 @@ export default {
 | 
				
			|||||||
					title = "订单详情"
 | 
										title = "订单详情"
 | 
				
			||||||
					break;
 | 
										break;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			uni.setNavigationBarTitle({
 | 
								// uni.setNavigationBarTitle({
 | 
				
			||||||
				title: title
 | 
								// 	title: title
 | 
				
			||||||
			});
 | 
								// });
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
		payNow() {
 | 
							payNow() {
 | 
				
			||||||
			this.$u.route('/pageC/cart/cashier', {
 | 
								this.$u.route('/pageC/cart/cashier', {
 | 
				
			||||||
 | 
				
			|||||||
@ -2,7 +2,6 @@
 | 
				
			|||||||
	<view>
 | 
						<view>
 | 
				
			||||||
		<view class="status_bar"></view>
 | 
							<view class="status_bar"></view>
 | 
				
			||||||
		<view class="index">
 | 
							<view class="index">
 | 
				
			||||||
			<navigator url="/pageB/photo/index?id=28">bbb</navigator>
 | 
					 | 
				
			||||||
			<view class="top">
 | 
								<view class="top">
 | 
				
			||||||
				<view class="sosuo"></view>
 | 
									<view class="sosuo"></view>
 | 
				
			||||||
				<view class="tabs">
 | 
									<view class="tabs">
 | 
				
			||||||
@ -83,7 +82,6 @@
 | 
				
			|||||||
								</view>
 | 
													</view>
 | 
				
			||||||
							</view>
 | 
												</view>
 | 
				
			||||||
						</view>
 | 
											</view>
 | 
				
			||||||
 | 
					 | 
				
			||||||
					</scroll-view>
 | 
										</scroll-view>
 | 
				
			||||||
				</swiper-item>
 | 
									</swiper-item>
 | 
				
			||||||
			</swiper>
 | 
								</swiper>
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user