Browse Source

2024-8-26

cmy 2 months ago
parent
commit
364fc518a7

+ 0 - 2
api/store.js

@@ -133,8 +133,6 @@ export function getProductslist(data) {
 	});
 }
 
-
-
 /**
  * 获取推荐产品
  * 

+ 4 - 4
config/app.js

@@ -13,15 +13,15 @@ module.exports = {
 	// 小程序配置
 	// #ifdef MP || APP-PLUS
 	// 请求域名 格式: https://您的域名
-	HTTP_REQUEST_URL: `https://test.syushop.com`,
+	HTTP_REQUEST_URL: `https://www.senyinkj.cn`,
 	// 长连接 格式:wss://您的域名 
-	VUE_APP_WS_URL: `wss://test.syushop.com/ws`,
+	VUE_APP_WS_URL: `wss://www.senyinkj.cn/ws`,
 	// #endif
 	// H5配置
 	// #ifdef H5
 	//H5接口是浏览器地址,非单独部署不用修改
-	HTTP_REQUEST_URL:'https://test.syushop.com'  ,
-	// HTTP_REQUEST_URL:  "https://www.senyinkj.cn",
+	// HTTP_REQUEST_URL:'https://test.syushop.com'  ,
+	HTTP_REQUEST_URL:  "https://www.senyinkj.cn",
 	// 长连接地址,非单独部署不用修改
 	VUE_APP_WS_URL: `wss://${window.location.host}/ws`,
 	// #endif

+ 2 - 2
manifest.json

@@ -2,8 +2,8 @@
     "name" : "神英优选",
     "appid" : "__UNI__3F43051",
     "description" : "神英优选商城",
-    "versionName" : "3.0.1",
-    "versionCode" : 301,
+    "versionName" : "3.0.4",
+    "versionCode" : 304,
     "transformPx" : false,
     /* 5+App特有相关 */
     "app-plus" : {

+ 1 - 1
pages/goods/goods_list/index.vue

@@ -332,7 +332,7 @@
 					keyword: '',
 					priceOrder: '',
 					salesOrder: '',
-					award:-1,
+					award:0,
 					news: 0,
 					page: 1,
 					limit: 20,

+ 2 - 0
pages/goods_cate/goods_cate.vue

@@ -45,6 +45,7 @@
 		onReady() {
 		},
 		onShow() {
+			console.log(this.category,'this.category')
 			if(this.category==2){
 				this.$refs.classTwo.getNoCart();
 				this.$refs.classTwo.getCartList(1);
@@ -75,6 +76,7 @@
 				colorChange('category').then(res=>{
 					let status = res.data.status;
 					this.category = status;
+					console.log(this.category,'this.category')
 					if(status==1){
 						this.$refs.classOne.getAllCategory();
 					}

+ 2 - 1
pages/goods_cate/goods_cate2.vue

@@ -504,7 +504,8 @@
 					limit: that.limit,
 					type: 1,
 					cid: that.cid,
-					sid: that.sid
+					sid: that.sid,
+					award:0,
 				}).then(res => {
 					let list = res.data,
 						loadend = list.length < that.limit;

+ 8 - 3
pages/user/index.vue

@@ -477,8 +477,13 @@
 		</view>
 		<view class="codePopup" :style="colorStyle" v-show="isCode">
 			<view class="header acea-row row-between-wrapper">
-				<view class="title" :class="{'on': codeIndex == index,'onLeft':codeIndex == 1}"
-					v-for="(item, index) in codeList" :key="index" @click="tapCode(index)">{{item.name}}</view>
+				<template>
+					<view v-if="index!=2" class="title" :class="{'on': codeIndex == index,'onLeft':codeIndex == 1}"
+						v-for="(item, index) in codeList" :key="index" @click="tapCode(index)">{{item.name}}</view>
+						<view v-if="userInfo.is_shop==1" class="title" :class="{'on': codeIndex == 2,'onLeft':codeIndex == 1}"
+							 :key="index" @click="tapCode(2)">收款码</view>
+				</template>
+				
 			</view>
 			<view>
 				<view class="acea-row row-center-wrapper">
@@ -656,7 +661,7 @@
 				}, {
 					name: '付款码'
 				},{
-					name: 'UID'
+					name: '收款码'
 				}],
 				codeIndex: 0,
 				config: {

+ 1 - 1
pages/users/user_goods_collection/index.vue

@@ -79,7 +79,7 @@
 			<view class='pictrue'>
 				<image :src="imgHost + '/statics/images/noCollection.png'"></image>
 			</view>
-			<recommend :hostProduct="hostProduct"></recommend>
+			<!-- <recommend :hostProduct="hostProduct"></recommend> -->
 		</view>
 		<view></view>
 		<home v-if="navigation"></home>

+ 18 - 10
pages/users/user_integral/integral.vue

@@ -56,7 +56,7 @@
 							:hidden='navList[current].loading==false'></text>{{navList[current].loadTitle}}
 					</view>
 					<view v-if="navList[current].integralList.length == 0">
-						<emptyPage title="暂无积分记录哦~"></emptyPage>
+						<emptyPage title="暂无记录哦~"></emptyPage>
 					</view>
 				</view>
 			</view>
@@ -157,17 +157,14 @@
 			}
 		},
 		onLoad(option) {
-
 			if (this.isLogin) {
 				this.getUserInfo();
 				if (option.type == 2) {
-					this.getIntegralListAction();
 					uni.setNavigationBarTitle({
 						title: "参考分"
 					})
 				}
 				if (option.type == 3) {
-					this.getIntegralList();
 					uni.setNavigationBarTitle({
 						title: "消费分"
 					})
@@ -178,6 +175,7 @@
 				if (option.numType) {
 					this.numType = option.numType;
 				}
+				this.loadList();
 			} else {
 				toLogin()
 			}
@@ -189,9 +187,17 @@
 		 * 页面上拉触底事件的处理函数
 		 */
 		onReachBottom: function() {
-			this.getIntegralList();
+			this.loadList();
 		},
 		methods: {
+			loadList() {
+				if (this.modelType == 2) {
+					this.getIntegralListAction();
+				}
+				if (this.modelType == 3) {
+					this.getIntegralList();
+				}
+			},
 			/**
 			 * 授权回调
 			 */
@@ -335,8 +341,7 @@
 </script>
 
 <style scoped lang="scss">
-	.pageTop {
-	}
+	.pageTop {}
 
 	.integral-details {
 		.header {
@@ -354,7 +359,8 @@
 			// background-color: var(--view-theme);
 			background-image: linear-gradient(45deg, rgb(255, 242, 232) 10%, #fff0f2 35%, rgb(255, 234, 247) 45%, #ffcdd3 75%, #ffb0b3);
 			position: relative;
-			padding-top: calc( var(--status-bar-height) + 50rpx );
+			padding-top: calc(var(--status-bar-height) + 50rpx);
+
 			.currentScore {
 				font-size: 26rpx;
 				color: rgba(255, 255, 255, 0.8);
@@ -399,6 +405,7 @@
 	.integral-details {
 		.wrapper {
 			position: relative;
+
 			.nav {
 				flex: 1;
 				width: 690rpx;
@@ -547,9 +554,10 @@
 		width: 160rpx;
 		border-radius: 50rpx;
 	}
-	.target{
+
+	.target {
 		position: absolute;
-		bottom: 130rpx ;
+		bottom: 130rpx;
 		right: 0rpx;
 		padding: 6rpx 30rpx;
 		border: 1px solid #FFF;

+ 1 - 1
pages/users/user_spread_money/index.vue

@@ -23,7 +23,7 @@
 									<view class='itemn1 acea-row row-between-wrapper'>
 										<view>
 											<view class='name line1'>
-												{{item.title}}
+												{{item.mark||item.title}}
 												<!-- <text class="status_badge success" v-if="recordType == 4 && item.status == 1">审核通过</text> -->
 												<text class="status_badge default" v-if="recordType == 4 && item.status == 0">待审核</text>
 												<text class="status_badge error" v-if="recordType == 4 && item.status == 2">未通过</text>

+ 84 - 71
utils/upApp.js

@@ -1,89 +1,102 @@
 import confige from '@/config/app.js'
 import {getAppVersion} from '@/api/api.js'
+const getIosUpAppUrl = 'https://itunes.apple.com/cn/lookup?id=6476127203'
 const iosAppStroeUrl =
-	'https://apps.apple.com/cn/app/%E6%BB%A1%E5%9B%AD%E6%98%A5%E7%BA%BF%E4%B8%8A%E5%95%86%E5%9F%8E/id1524593346';
+	'https://apps.apple.com/cn/app/%E7%A5%9E%E8%8B%B1%E4%BC%98%E9%80%89/id6476127203';
 
 // 获取app是否需要升级
 export function getUpApp () {
 	// 获取当前运行系统
 	let hj = uni.getSystemInfoSync().platform;
 	// 获取仓库app数据对象
-	// let app = store.state.isShowIllegality;
+	if (hj === 'ios') {
+		uni.request({
+			url: getIosUpAppUrl,
+			method: 'POST',
+			data: {},
+			success: res => {
+				
+				console.log(res)
+				let r = res.data;
+				isUp(r, hj)
+			},
+			fail: res => {
+				// store.commit('changeState', true);
+				console.log(res, 'shib');
+			}
+		});
+		// 设置显示数据
+		return
+	}
 	// 当前系统为安卓则显示数据
 	if (hj === 'android') {
-		// 设置默认显示数据
-		// app = true;
-		// store.commit('changeState', {
-		// 	name: 'app',
-		// 	value: app
-		// });
-	}
-	console.log('开始升级');
-	getAppVersion().then((res)=>{
-		console.log(res,'回调');
+		getAppVersion().then((res)=>{
 			let r = res.data;
-			plus.runtime.getProperty(plus.runtime.appid, function(wgtinfo) {
-				console.log(r.version,'获取版本');
-				// 保存线上版本号
-				let version = r.version;
-				// 获取线上版本
-				const arr = r.version.split('.');
-				// 获取当前系统
-				const arr1 = wgtinfo.version.split('.');
-				console.log(version,'升级数据2');
-				console.log(arr,'升级数据3');
-				console.log(arr1,'升级数据4');
-				let up = false;
-				
-				for (let i = 0; i < arr.length; i++) {
-					// 线上版本号
-					const x = +arr[i];
-					// 线下版本号
-					const y = +arr1[i];
-					// 判断当前版本是否为小于等于线上版本
-					console.log(x,y,'循环');
-					if (x >= y) {
-						// 只有ios才需要显示
-						// if (hj === 'ios') {
-						// 	// 设置显示数据
-						// 	// app = true;
-						// 	// store.commit('changeState', {
-						// 	// 	name: 'app',
-						// 	// 	value: app
-						// 	// });
-						// }
-						// 当版本较低时更新数据
-						console.log(x,y);
-						if(up==true){
-							return;
+			isUp(r, hj)
+		}).catch((res)=>{
+			console.log(res);
+		})
+	}
+}
+function isUp(r, hj) {
+	plus.runtime.getProperty(plus.runtime.appid, function(wgtinfo) {
+		let version = '';
+		let arr = '';
+		if (hj == "android") {
+			// 保存线上版本号
+			version =r.version;
+			// store.commit('setappversion',  r.version);
+			// 获取线上版本
+			arr = r.version.split('.');
+		}
+		if (hj == "ios") {
+			// 保存线上版本号
+			version = r.results[0].version;
+			// store.commit('setappversion', version);
+			// 获取线上版本
+			arr = r.results[0].version.split('.');
+		}
+		// 获取当前系统
+		const arr1 = wgtinfo.version.split('.');
+		for (let i = 0; i < arr.length; i++) {
+			// 线上版本号
+			const x = +arr[i];
+			// 本地版本号
+			const y = +arr1[i];
+			// 判断线上版本是否小于本地版本
+			console.log(x, y, '数据');
+			if (x < y) {
+				console.log('数据隐藏');
+				// 设置显示数据
+				store.commit('changeState', false);
+				return
+			}
+			// 判断线上版本是否大于本地版本
+			else if (x > y) {
+				uni.showModal({
+					title: '提示',
+					content: '请更新应用',
+					showCancel: false,
+					success(e) {
+						if (hj == "android") {
+							downApp(r.apk);
 						}
-						if (x > y) {
-							up = true;
-							uni.showModal({
-								title: '提示',
-								content: '请更新应用',
-								showCancel: false,
-								success(e) {
-									// if (hj === 'ios') {
-									// 	plus.runtime.openURL(
-									// 		iosAppStroeUrl
-									// 	);
-									// }
-									if (hj === 'android') {
-										// plus.runtime.openURL('http://lxscimg.liuniu946.com/lxscV' + version + '.apk');
-										console.log(r.apk,'下載地址');
-										downApp(r.apk);
-									}
-								}
-							});
+						if (hj == "ios") {
+							plus.runtime.openURL(
+								iosAppStroeUrl
+							);
 						}
-						
 					}
-				}
-			});
-	}).catch((res)=>{
-		console.log(res);
-	})
+				});
+				return
+			} 
+			// 判断是否本地版本等于线上版本
+			else if (x == y && i == arr.length - 1) {
+				store.commit('changeState', true);
+				return
+			}
+		}
+	});
 }
 // 下载app
 export function downApp (version) {