Ver código fonte

用系统参数区分接口 优化我的积分格式 修改部分手机详情地址不能正常输入的问题

Qukatie 5 meses atrás
pai
commit
1697d7fe15

+ 19 - 4
api/tabBar/homeNew.js

@@ -1,8 +1,15 @@
 import http from '@/http/api.js'
-
 // 商品检索
 export function appList(params) {
 	return http.request({
+		url: '/blade-sales-part/productLaunch/appList',
+		method: 'GET',
+		params
+	})
+}
+// 商品检索
+export function appListNew(params) {
+	return http.request({
 		url: '/blade-sales-part/shoppingmalldetail/appList',
 		method: 'GET',
 		params
@@ -11,6 +18,14 @@ export function appList(params) {
 // 商品明细
 export function appDetail(params) {
 	return http.request({
+		url: '/blade-sales-part/productLaunch/appDetail',
+		method: 'GET',
+		params
+	})
+}
+// 商品明细
+export function appDetailNew(params) {
+	return http.request({
 		url: '/blade-sales-part/shoppingmalldetail/appDetail',
 		method: 'GET',
 		params
@@ -96,10 +111,10 @@ export const listShareV1 = (data) => {
 		params: data
 	})
 }
-export function isProcurement(data) {
+export const isProcurement = (data) => {
 	return http.request({
 		url: '/blade-system/paramservice/retrieveParameters',
-		method: 'get',
+		method: 'GET',
 		params: data
 	})
-}
+}

+ 2 - 2
common/setting.js

@@ -10,9 +10,9 @@ module.exports = {
 	version: '1.0.0',
 	// 开发环境接口Url
 	// devUrl: 'http://192.168.0.111:1080',
-	devUrl: 'http://192.168.8.113:1080',
+	// devUrl: 'http://192.168.8.113:1080',
 	// devUrl: 'https://td.echepei.com/api', 
-	// devUrl: 'https://lt.echepei.com/api',   // 鑫畅途的
+	devUrl: 'https://lt.echepei.com/api',   // 鑫畅途的
 	// devUrl: 'http://jxy.natapp1.cc/api',
 	// devUrl: 'http://121.37.83.47:10004',
 	// 线上环境接口Url

+ 80 - 64
pages/login/login.vue

@@ -13,7 +13,7 @@
 		<div style="margin-top: 20rpx;display: flex;justify-content: center;">
 			<view>
 				<u-checkbox-group v-model="checkboxValue1" placement="column">
-				    <u-checkbox :customStyle="{marginBottom: '8px'}" ></u-checkbox>
+					<u-checkbox :customStyle="{marginBottom: '8px'}"></u-checkbox>
 				</u-checkbox-group>
 			</view>
 			<view>
@@ -28,16 +28,19 @@
 				height: auto;
 				margin: 0 auto 10rpx;" mode="widthFix"></image>
 			青岛途宝软件开发有限公司提供技术支持
-		</view>
+		</view>
 		<PrivacyPop ref="PrivacyPopck"></PrivacyPop>
 	</view>
 </template>
-<script>
+<script>
+	import {
+		isProcurement
+	} from '@/api/tabBar/homeNew.js'
 	import PrivacyPop from './PrivacyPop/PrivacyPop.vue'
 	import md5 from '@/utils/md5.js'
-	export default {
-		components:{
-			PrivacyPop
+	export default {
+		components: {
+			PrivacyPop
 		},
 		data() {
 			return {
@@ -48,87 +51,100 @@
 				checked: false,
 				lifeData: {},
 				logo: "/static/images/logo/logo.png",
-				checkboxValue1:[],
+				checkboxValue1: [],
 			}
-		},
+		},
 		onLoad(options) {
-			if(options){
-					uni.setStorageSync('QRcodeDate', options);
+			if (options) {
+				uni.setStorageSync('QRcodeDate', options);
 			}
-		
+
 		},
-		onShow() {
-			
+		onShow() {
+
 		},
 		methods: {
 			// 协议跳转
-			tiaozhuanxieyi(){
+			tiaozhuanxieyi() {
 				uni.$u.route('pages/login/xieyi')
 			},
-			zhuangtao(type){
+			zhuangtao(type) {
 				this.checkboxValue1 = [""]
 			},
 			change(e) {
 				this.checked = !this.checked
 			},
 			//当前登录按钮操作
-			getPhoneNumber(e) {
-				console.log(e,73);
+			getPhoneNumber(e) {
+				console.log(e, 73);
 				let this_ = this
-				if(this.checkboxValue1.length == 0) return uni.showToast({icon: 'none',title: '请勾选用户协议',position: "bottom",mask: true})
+				if (this.checkboxValue1.length == 0) return uni.showToast({
+					icon: 'none',
+					title: '请勾选用户协议',
+					position: "bottom",
+					mask: true
+				})
 				if (e.detail.errMsg == 'getPhoneNumber:ok') {
 					wx.login({
 						success(res) {
-							if (res.code) {
-								wx.getUserInfo({
-									success: function(rest) {
-										this_.$u.api.tokenTwo({
-											telCode: e.detail.code,
-											loginCode: res.code,
-											iv: e.detail.iv,
-											encryptedData: e.detail.encryptedData,
-											applets_id: uni.getAccountInfoSync().miniProgram.appId
-										}).then(rest => {
-											uni.showLoading({
-												title: '登录中',
-												mask: true
-											});
-											this_.$u.api.empowerToken({
-												username: rest.data.phoneNumber,
-												union_id: rest.data.unionid,
-												open_id: rest.data.openid,
-												applets_id: uni.getAccountInfoSync().miniProgram.appId,
-												password: md5('123456')
-											}).then(data => {
-												uni.hideLoading();
-												uni.showToast({
-													icon: 'none',
-													title: '登录成功',
-													position: "bottom",
-													mask: true
-												})
-												setTimeout(function() {
-													this_.$u.func.login(data)
-												}, 1000);
-											}).catch(err=>{
-												uni.hideLoading();
-												uni.showToast({
-													icon: 'none',
-													title: err.error_description,
-													position: "bottom",
-													mask: true
-												})
-											})
-										})
-									},
-									fail: res => {
-										console.log(res,121);
+							if (res.code) {
+								wx.getUserInfo({
+									success: function(rest) {
+										this_.$u.api.tokenTwo({
+											telCode: e.detail.code,
+											loginCode: res.code,
+											iv: e.detail.iv,
+											encryptedData: e.detail.encryptedData,
+											applets_id: uni.getAccountInfoSync().miniProgram
+												.appId
+										}).then(rest => {
+											uni.showLoading({
+												title: '登录中',
+												mask: true
+											});
+											this_.$u.api.empowerToken({
+												username: rest.data.phoneNumber,
+												union_id: rest.data.unionid,
+												open_id: rest.data.openid,
+												applets_id: uni.getAccountInfoSync()
+													.miniProgram.appId,
+												password: md5('123456')
+											}).then(data => {
+												uni.hideLoading();
+												uni.showToast({
+													icon: 'none',
+													title: '登录成功',
+													position: "bottom",
+													mask: true
+												})
+												setTimeout(function() {
+													this_.$u.func.login(data)
+													isProcurement({
+														"param": "whether.open.share"
+													}).then(res => {
+														uni.setStorageSync('whether_openShare',res.data);
+													})
+												}, 1000);
+											}).catch(err => {
+												uni.hideLoading();
+												uni.showToast({
+													icon: 'none',
+													title: err
+														.error_description,
+													position: "bottom",
+													mask: true
+												})
+											})
+										})
+									},
+									fail: res => {
+										console.log(res, 121);
 										uni.showToast({
 											icon: 'none',
 											title: '已拒绝授权,请重新授权',
 											position: "bottom"
 										})
-									}
+									}
 								})
 							} else {
 								uni.showToast({
@@ -298,4 +314,4 @@
 		height: 0;
 		content: '\20';
 	}
-</style>
+</style>

+ 40 - 19
pages/tabBar/home.vue

@@ -91,7 +91,7 @@
 								<view style="padding-top: 12rpx;">
 									<view v-if="item.billType == 0"
 										style="font-size: 16rpx;background-color: #FD4B09;color: #fff;padding: 6rpx;border-radius: 6rpx;">
-										今日达</view>
+										小时达</view>
 									<view v-else
 										style="font-size: 16rpx;background-color: #5ac725;color: #fff;padding: 6rpx;border-radius: 6rpx;">
 										次日达</view>
@@ -116,7 +116,7 @@
 								<view style="padding-top: 12rpx;">
 									<view v-if="item.billType == 0"
 										style="font-size: 16rpx;background-color: #FD4B09;color: #fff;padding: 6rpx;border-radius: 6rpx;">
-										今日达</view>
+										小时达</view>
 									<view v-else
 										style="font-size: 16rpx;background-color: #5ac725;color: #fff;padding: 6rpx;border-radius: 6rpx;">
 										次日达</view>
@@ -148,9 +148,10 @@
 <script>
 	import {
 		appList,
+		appListNew,
 		userDept,
 		validationCorpEmpty,
-
+		isProcurement,
 		brandDescList,
 		brandDescDetail
 	} from '@/api/tabBar/homeNew.js'
@@ -466,22 +467,42 @@
 				if (this.explosionProof) {
 					obj.explosionProof = 1
 				}
-				appList({
-					size: this.page.size,
-					current: this.page.current,
-					...obj,
-					...this.search,
-					whetherIntegral: 0
-				}).then(res => {
-					this.dataList = this.dataList.concat(res.data.records)
-					this.page.total = res.data.total
-					if (this.dataList.length == res.data.total) {
-						this.status = 'nomore'
-					}
-					uni.hideLoading();
-				}).catch(err => {
-					uni.hideLoading();
-				})
+				if (uni.getStorageSync('whether_openShare') == 1) {
+					appListNew({
+						size: this.page.size,
+						current: this.page.current,
+						...obj,
+						...this.search,
+						whetherIntegral: 0
+					}).then(res => {
+						this.dataList = this.dataList.concat(res.data.records)
+						this.page.total = res.data.total
+						if (this.dataList.length == res.data.total) {
+							this.status = 'nomore'
+						}
+						uni.hideLoading();
+					}).catch(err => {
+						uni.hideLoading();
+					})
+				} else {
+					appList({
+						size: this.page.size,
+						current: this.page.current,
+						...obj,
+						...this.search,
+						whetherIntegral: 0
+					}).then(res => {
+						this.dataList = this.dataList.concat(res.data.records)
+						this.page.total = res.data.total
+						if (this.dataList.length == res.data.total) {
+							this.status = 'nomore'
+						}
+						uni.hideLoading();
+					}).catch(err => {
+						uni.hideLoading();
+					})
+				}
+
 			},
 			close() {
 				this.show = false

+ 3 - 6
pages/tabBar/integralList/exchangeRecords.vue

@@ -9,7 +9,7 @@
 				<view>
 					类型
 				</view>
-				<view>
+				<view style="width: 500rpx;text-align: right;">
 					{{item.type?item.type:'—'}}
 				</view>
 			</view>
@@ -17,7 +17,7 @@
 				<view>
 					商品名称
 				</view>
-				<view>
+				<view style="width: 500rpx;text-align: right;">
 					{{item.goodsName?item.goodsName:'—'}}
 				</view>
 			</view>
@@ -25,13 +25,10 @@
 				<view>
 					积分
 				</view>
-				<view>
+				<view style="width: 500rpx;text-align: right;">
 					{{item.integral}}
 				</view>
 			</view>
-			<view class="describeBox">
-				{{item.remarks?item.remarks:''}}
-			</view>
 		</view>
 		<u-empty v-if="data.length == 0" mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png" />
 		<!-- <u-loadmore v-if="page.total !== 0 && data.length != 0" :status="status" /> -->

+ 3 - 3
pages/tabBar/integralList/obtainRecord.vue

@@ -9,7 +9,7 @@
 				<view>
 					类型
 				</view>
-				<view>
+				<view style="width: 500rpx;text-align: right;">
 					{{item.type?item.type:'—'}}
 				</view>
 			</view>
@@ -17,7 +17,7 @@
 				<view>
 					商品名称
 				</view>
-				<view>
+				<view style="width: 500rpx;text-align: right;">
 					{{item.goodsName?item.goodsName:'—'}}
 				</view>
 			</view>
@@ -25,7 +25,7 @@
 				<view>
 					积分
 				</view>
-				<view>
+				<view style="width: 500rpx;text-align: right;">
 					{{item.integral}}
 				</view>
 			</view>

+ 37 - 20
pages/views/buyGoods/commodityDetails.vue

@@ -15,7 +15,7 @@
 				<view style="display: flex;">
 					<view v-if="form.billType == 0"
 						style="font-size: 16rpx;background-color: #FD4B09;color: #fff;padding: 6rpx;border-radius: 6rpx;">
-						今日达</view>
+						小时达</view>
 					<view v-else
 						style="font-size: 16rpx;background-color: #5ac725;color: #fff;padding: 6rpx;border-radius: 6rpx;">
 						次日达</view>
@@ -35,7 +35,7 @@
 				<view style="display: flex;">
 					<view v-if="form.billType == 0"
 						style="font-size: 16rpx;background-color: #909399;color: #fff;padding: 6rpx;border-radius: 6rpx;">
-						今日达</view>
+						小时达</view>
 					<view v-else
 						style="font-size: 16rpx;background-color: #909399;color: #fff;padding: 6rpx;border-radius: 6rpx;">
 						次日达</view>
@@ -51,17 +51,19 @@
 					<template slot="title">
 						<view style="display: flex;">
 							<u-radio-group v-model="inventoryDataForm.storeInventory">
-								<u-radio :activeColor="inventoryDataForm.storeInventory>0?'#FD4B09':'#909399'" v-if="inventoryDataForm.storeInventory"
-									:label="`今日达(库存:${~~(inventoryDataForm.storeInventory) > 10 ? '充足' : ~~(inventoryDataForm.storeInventory)})`"
+								<u-radio :activeColor="inventoryDataForm.storeInventory>0?'#FD4B09':'#909399'"
+									v-if="inventoryDataForm.storeInventory"
+									:label="`小时达(${~~(inventoryDataForm.storeInventory) > 10 ? '充足' : ~~(inventoryDataForm.storeInventory)})`"
 									:name="inventoryDataForm.storeInventory"></u-radio>
 							</u-radio-group>
 							<u-radio-group v-model="inventoryDataForm.storeInventoryShare">
-								<u-radio :activeColor="inventoryDataForm.storeInventoryShare>0?'#5ac725':'#909399'" v-if="inventoryDataForm.storeInventoryShare"
-									:label="`次日达(库存:${~~(inventoryDataForm.storeInventoryShare) > 10 ? '充足' : ~~(inventoryDataForm.storeInventoryShare)})`"
+								<u-radio :activeColor="inventoryDataForm.storeInventoryShare>0?'#5ac725':'#909399'"
+									v-if="inventoryDataForm.storeInventoryShare"
+									:label="`次日达(${~~(inventoryDataForm.storeInventoryShare) > 10 ? '充足' : ~~(inventoryDataForm.storeInventoryShare)})`"
 									:name="inventoryDataForm.storeInventoryShare"></u-radio>
 							</u-radio-group>
 						</view>
-					
+
 					</template>
 					<template slot="value">
 						<view>
@@ -103,12 +105,12 @@
 						<view style="display: flex;">
 							<u-radio-group v-model="inventoryDataForm.storeInventory">
 								<u-radio activeColor="#909399" v-if="inventoryDataForm.storeInventory"
-									:label="`今日达(库存:${~~(inventoryDataForm.storeInventory) > 10 ? '充足' : ~~(inventoryDataForm.storeInventory)})`"
+									:label="`小时达(${~~(inventoryDataForm.storeInventory) > 10 ? '充足' : ~~(inventoryDataForm.storeInventory)})`"
 									:name="inventoryDataForm.storeInventory"></u-radio>
 							</u-radio-group>
 							<u-radio-group v-model="inventoryDataForm.storeInventoryShare">
 								<u-radio activeColor="#909399" v-if="inventoryDataForm.storeInventoryShare"
-									:label="`次日达(库存:${~~(inventoryDataForm.storeInventoryShare) > 10 ? '充足' : ~~(inventoryDataForm.storeInventoryShare)})`"
+									:label="`次日达(${~~(inventoryDataForm.storeInventoryShare) > 10 ? '充足' : ~~(inventoryDataForm.storeInventoryShare)})`"
 									:name="inventoryDataForm.storeInventoryShare"></u-radio>
 							</u-radio-group>
 						</view>
@@ -229,6 +231,7 @@
 <script>
 	import {
 		appDetail,
+		appDetailNew,
 		addToCart,
 		appModifyPrice,
 		stockDescList,
@@ -264,16 +267,30 @@
 		},
 		onLoad(onLoad) {
 			this.checkStatus = uni.getStorageSync('checkStatus');
-			appDetail(onLoad).then(res => {
-				this.dataForm = res.data
-				if (res.data.type == 0) {
-					this.form = res.data.thisLocality
-				} else {
-					this.form = res.data.offsite
-				}
-				this.form.goodsNum = Number(this.form.goodsNum)
-				this.stockDescListfun()
-			})
+			if (uni.getStorageSync('whether_openShare') == 1) {
+				appDetailNew(onLoad).then(res => {
+					this.dataForm = res.data
+					if (res.data.type == 0) {
+						this.form = res.data.thisLocality
+					} else {
+						this.form = res.data.offsite
+					}
+					this.form.goodsNum = Number(this.form.goodsNum)
+					this.stockDescListfun()
+				})
+			} else {
+				appDetail(onLoad).then(res => {
+					this.dataForm = res.data
+					if (res.data.type == 0) {
+						this.form = res.data.thisLocality
+					} else {
+						this.form = res.data.offsite
+					}
+					this.form.goodsNum = Number(this.form.goodsNum)
+					this.stockDescListfun()
+				})
+			}
+
 		},
 		methods: {
 			// admin确认
@@ -301,7 +318,7 @@
 			// 库存查询
 			stockDescListfun() {
 				listShareV1({
-					code: this.form.goodsCode,
+					code: uni.getStorageSync('whether_openShare') == 1 ? this.form.goodsCode : this.form.code,
 					whether: 0
 				}).then(res => {
 					this.inventoryDataForm = res.data

+ 5 - 2
pages/views/personalInformation/addressDetails.vue

@@ -14,9 +14,9 @@
 				<input v-model="form.belongtoarea" disabled type="text" placeholder-class="line"
 					placeholder="省市区县、乡镇等" />
 			</view>
-			<view class="item address" style="border: none;line-height: 0;">
+			<view style="border: none;display: flex;margin-top: 6rpx;">
 				<view class="left">详细地址:</view>
-				<textarea v-model="form.detailedAddress" :maxlength="-1" placeholderClass="line" placeholder="街道、楼牌等" />
+				<u--textarea v-model="form.detailedAddress" placeholder="街道、楼牌等"/>
 			</view>
 		</view>
 		<view class="bottom">
@@ -170,6 +170,9 @@
 </script>
 
 <style lang="scss" scoped>
+	.u--textareau--textarea{
+		color: #000 !important;
+	}
 	.add {
 		width: 100%;
 		position: fixed;