lhl 4 lat temu
rodzic
commit
1ed4f1c8bf

+ 14 - 7
pages/index/gongyiList.vue

@@ -1,6 +1,7 @@
 <template>
 	<view class="main">
-		<view class="list-box-h">
+		<view class="list-box-h">
+			<empty v-if="loaded === true && list.length == 0"></empty>
 			<view v-for="(item, index) in list" :key="index" class="guess-item" @click="navToDetailPage(item)">
 				<image :src="item.image"></image>
 				<view class="guess-box">
@@ -23,17 +24,22 @@
 	</view>
 </template>
 
-<script>
+<script>
+	import empty from '@/components/empty';
 	import {
 		getProducts
 	} from '@/api/product.js';
-	export default {
+	export default {
+		components: {
+			empty
+		},
 		data() {
 			return {
 				list: [],
 				page: 1,
 				limit: 10,
-				loadingType: 'more',
+				loadingType: 'more',
+				loaded: false
 			}
 		},
 		onLoad(opt) {
@@ -54,9 +60,9 @@
 				getProducts({
 					page: obj.page,
 					limit: obj.limit,
-					is_gp:1 ,//设置是否vip商品
+					// is_gp:1 ,//设置是否vip商品
 					// sid:obj.sid
-					cid:8
+					cid:6
 					
 					
 				}).then(({
@@ -69,7 +75,8 @@
 						obj.loadingType = 'more'
 					} else {
 						obj.loadingType = 'noMore'
-					}
+					}
+					obj.loaded = true
 				})
 			}
 		}

+ 1 - 1
pages/index/jfgood.vue

@@ -116,8 +116,8 @@
 				let obj = this
 				obj.page = 1
 				obj.list = []
+				obj.loadingType = 'more'
 				obj.getArticleList()
-				// obj.loadData()
 			}
 		}
 	}

+ 30 - 15
pages/money/pay.vue

@@ -5,7 +5,7 @@
 			<text class="price">{{ money }}</text>
 		</view>
 		<view class="pay-type-list">
-			<view class="type-item b-b" @click="changePayType(1)">
+			<view class="type-item b-b" @click="changePayType(1)" v-if="bool">
 				<text class="icon iconfont iconweixin"></text>
 				<view class="con">
 					<text class="tit">微信支付</text>
@@ -53,7 +53,10 @@
 import { balance } from '@/api/wallet.js';
 import { createOrderkey,computedOrderkey,orderPay } from '@/api/order.js';
 import { getUserInfo } from '@/api/user.js';
-import { mapState } from 'vuex';
+import { mapState } from 'vuex';
+// #ifdef H5
+import weixinBJ from "@/utils/wxAuthorized.js";
+// #endif
 export default {
 	data() {
 		return {
@@ -77,16 +80,16 @@ export default {
 			pinkid: '' ,//保存拼团商品id
 			'gp_now_money':0,
 			'integral':0,
-			is_gp:0//1为公排0不是公排
+			is_gp:0,//1为公排0不是公排
+			bool: true
 		};
 	},
-	computed: {
-		// #ifdef H5
-		...mapState(['weichatObj'])
-		// #endif
-	},
 	onLoad(options) {
-		
+		this.bool = uni.getStorageSync('weichatBrowser');
+		if(!this.bool) {
+			this.payType = 3
+			this.payName = 'yue'
+		}
 		if (options.type == 1) {
 			this.type = 1;
 			this.orderId = options.ordid;
@@ -179,7 +182,8 @@ export default {
 							obj.$api.msg(msg);
 						}
 					}
-					if (obj.payName == 'weixin' || obj.payName == 'routine') {
+					if (obj.payName == 'weixin' || obj.payName == 'routine') {
+						console.log("开始调用");
 						let da = e.data.result.jsConfig;
 						let data = {
 							// #ifdef H5
@@ -195,15 +199,26 @@ export default {
 							success: function(res) {
 								obj.paySuccessTo();
 							},
-							fail: () => {
-								uni.navigateTo({
-									url: '/pages/order/order?state=0'
+							fail: (e) => {
+								uni.showModal({
+									title: '错误',
+									content: e,
 								});
+								// uni.navigateTo({
+								// 	url: '/pages/order/order?state=0'
+								// });
 							}
 						};
 						// #ifdef H5
-						if(obj.payName == 'weixin'){
-						obj.weichatObj.chooseWXPay(data);
+						if(obj.payName == 'weixin'){
+							weixinBJ.weixinObj.chooseWXPay(data);
+							// weixindata().then(() => {
+							// }).catch((e) => {
+							// 	uni.showModal({
+							// 		title: '错误',
+							// 		content: e,
+							// 	});
+							// })
 						}
 						// #endif
 						// #ifdef MP-WEIXIN

+ 25 - 9
pages/money/recharge.vue

@@ -15,7 +15,7 @@
 		<view class="list">
 					<radio-group @change="tabRadio">
 						<!-- #ifndef APP-PLUS -->
-						<label>
+						<label v-if="bool">
 							<view class="box">
 								<view class="icon iconfont iconweixin1"></view>
 								<view class="title-box">
@@ -56,7 +56,8 @@
 <script>
 import { getMoneyStyle } from '@/utils/rocessor.js';
 // #ifdef H5
-import { rechargeWechat,userBalance,extractBank} from '@/api/wallet.js';
+import { rechargeWechat,userBalance,extractBank} from '@/api/wallet.js';
+import weixinBJ from "@/utils/wxAuthorized.js";
 // #endif
 // #ifdef MP
 import { rechargeRoutine } from '@/api/wallet.js';
@@ -73,7 +74,7 @@ export default {
 			payLoding: false ,//是否加载中
 			yongMoney:'',
 			nowmoney:'',
-			
+			bool: true
 			
 		};
 	},
@@ -89,7 +90,14 @@ export default {
 			this.disable= true
 		});
 	},
-	onLoad(options) {},
+	onLoad(options) {
+		this.bool = uni.getStorageSync('weichatBrowser');
+		if(!this.bool) {
+			// this.payType = 3
+			this.type = 'yongjing'
+			this.typeText = 1
+		}
+	},
 	computed: {
 		// #ifdef H5
 		...mapState(['weichatObj'])
@@ -225,10 +233,19 @@ export default {
 						obj.payLoding = false;
 					}
 					if (obj.type == 'yongjing') {
-						uni.navigateTo({
-							url: '/pages/money/rechargeSuccess'
+						// uni.navigateTo({
+						// 	url: '/pages/money/rechargeSuccess'
+						// });
+						obj.payLoding = false;
+						uni.showToast({
+							title: '充值成功',
+							duration: 2000,
+						});
+						extractBank({}).then(({ data }) => {
+							obj.yongMoney = (data.commissionCount * 1).toFixed(2); //累积佣金
+							console.log(data,'wwwww');
+							obj.disable= true
 						});
-						obj.payLoding = false;
 						console.log(e, '佣金');
 					}
 				})
@@ -246,8 +263,7 @@ export default {
 					console.log(e);
 					if (obj.type == 'weixin') {
 						let da = e.data.data;
-						console.log(weixinObj, 'weixin');
-						weixinObj.chooseWXPay({
+						weixinBJ.weixinObj.chooseWXPay({
 							timestamp: da.timestamp,
 							nonceStr: da.nonceStr,
 							package: da.package,

+ 3 - 2
pages/order/orderRefund.vue

@@ -87,7 +87,8 @@ export default {
 			});
 		},
 		//提交
-		confirm() {
+		confirm() {
+			let obj = this;
 			if (!obj.refund) {
 				uni.showModal({
 					title: '错误',
@@ -96,7 +97,7 @@ export default {
 				});
 				return false;
 			}
-			let obj = this;
+			
 			refund({
 				text: obj.refund,
 				uni: obj.orderId,

+ 1 - 0
pages/product/product.vue

@@ -323,6 +323,7 @@ export default {
 				} //小程序商品详情图超出屏幕问题
 				obj.imgList = goods.slider_image; //保存轮播图
 				obj.specList = data.productAttr; //保存分类列表
+				obj.goodsStore = goods.stock
 				if (Array.isArray(data.productValue) != true) {
 					obj.many = 2;
 					obj.specList = data.productAttr; //保存产品属性

+ 5 - 5
pages/set/set.vue

@@ -3,22 +3,22 @@
 		<uni-list>
 		    <uni-list-item title="个人资料" @click="navTo('/pages/set/userinfo')" ></uni-list-item>
 			<uni-list-item title="修改密码" @click="navTo('/pages/set/password')" ></uni-list-item>
-		    <uni-list-item title="实名认证" @click="navTo('/pages/set/phone')" ></uni-list-item>
+		    <!-- <uni-list-item title="实名认证" @click="navTo('/pages/set/phone')" ></uni-list-item> -->
 		    <uni-list-item title="收货地址" @click="navTo('/pages/set/address')" ></uni-list-item>
 		</uni-list>
-		<uni-list class="margin-t-20">
+		<!-- <uni-list class="margin-t-20">
 		    <uni-list-item title="消息推送" :switch-checked='true' :show-switch="true" :show-arrow="false" switch-color='#5dbc7c'  @switchChange='switchChange'> 
 			</uni-list-item>
-		</uni-list>
+		</uni-list> -->
 		
-		<uni-list class="margin-t-20">
+		<!-- <uni-list class="margin-t-20">
 		    <uni-list-item title="清除缓存" ></uni-list-item>
 		    <uni-list-item title="检查更新" >
 				<template slot="right">
 					当前版本 1.0.3
 				</template>
 			</uni-list-item>
-		</uni-list>
+		</uni-list> -->
 		<view class="list-cell log-out-btn" @click="toLogout">
 			<text class="cell-tit">退出登录</text>
 		</view>

+ 2 - 2
pages/user/user.vue

@@ -11,7 +11,7 @@
 						</view>
 						<view class="info-box">
 							<view class="username">{{ userInfo.nickname || '游客' }}</view>
-							<view class="font-size-sm" v-if="userInfo.spread_uid">邀请码:{{ userInfo.spread_uid }}</view>
+							<view class="font-size-sm" v-if="userInfo.uid">UID: {{ userInfo.uid }}</view>
 							<text class="font-size-sm" v-if="orderTime!=''">分红周期:{{orderTime}}</text>
 						</view>
 					</view>
@@ -127,7 +127,7 @@
 							</view>
 							<text>奖励明细</text>
 						</view>
-						<view class="order-item" @click="navTo('/pages/user/award')" hover-class="common-hover"
+						<view class="order-item" @click="navTo('/pages/user/scoreAccumulate')" hover-class="common-hover"
 							:hover-stay-time="50">
 							<view class="icon">
 								<image class="icon-img" src="/static/icon/u3.png" mode="aspectFit"></image>

+ 1 - 1
store/index.js

@@ -6,7 +6,7 @@ Vue.use(Vuex)
 const store = new Vuex.Store({
 	state: {
 		// baseURL:"http://yrh.liuniu946.com",//'http://eb.shuibo.net',//请求地址配置 
-		baseURL:'http://gp.frp.liuniu946.com',//请求地址配置 
+		baseURL:'http://gp.liuniu946.com',//请求地址配置 
 		urlFile:'/index',//项目部署所在文件夹
 		loginInterceptor:false,//是否打开强制登录
 		// #ifdef H5 || MP-WEIXIN