Преглед изворни кода

新加共享接口 和积分商城

Qukatie пре 6 месеци
родитељ
комит
c7117ca8bc

+ 90 - 0
api/tabBar/homeNew.js

@@ -0,0 +1,90 @@
+import http from '@/http/api.js'
+
+// 商品检索
+export function appList(params) {
+	return http.request({
+		url: '/blade-sales-part/shoppingmalldetail/appList',
+		method: 'GET',
+		params
+	})
+}
+// 商品明细
+export function appDetail(params) {
+	return http.request({
+		url: '/blade-sales-part/shoppingmalldetail/appDetail',
+		method: 'GET',
+		params
+	})
+}
+// 商品明细加入购物车
+export function addToCart(data) {
+	return http.request({
+		url: '/blade-sales-part/productLaunch/addToCart',
+		method: 'POST',
+		data
+	})
+}
+// 积分商城明细兑换
+export function orderIntegralExchange(data) {
+	return http.request({
+		url: '/blade-sales-part/order/integralExchange ',
+		method: 'POST',
+		data
+	})
+}
+// 切换公司更换价格
+export function appModifyPrice(data) {
+	return http.request({
+		url: '/blade-sales-part/productLaunch/appModifyPrice',
+		method: 'GET',
+		data
+	})
+}
+//查询公司名称
+export function userDept(params) {
+	return http.request({
+		url: '/blade-system/dept/userDept',
+		method: 'GET',
+		params
+	})
+}
+//客户校验是否为空
+export function validationCorpEmpty(params) {
+	return http.request({
+		url: '/blade-sales-part/corpsDesc/validationCorpEmpty',
+		method: 'GET',
+		params
+	})
+}
+// 轮播图
+export const brandDescList = (data) => {
+	return http.request({
+		url: '/blade-sales-part/brandDesc/list',
+		method: 'GET',
+		params: data
+	})
+}
+export const brandDescDetail = (data) => {
+	return http.request({
+		url: '/blade-sales-part/brandDesc/detail',
+		method: 'GET',
+		params: data
+	})
+}
+
+// 库存查询
+export const stockDescList = (data) => {
+	return http.request({
+		url: '/blade-sales-part/stockDesc/list',
+		method: 'GET',
+		params: data
+	})
+}
+// 库存查询
+export const stockDescListV1 = (data) => {
+	return http.request({
+		url: '/blade-sales-part/stockDesc/listV1',
+		method: 'GET',
+		params: data
+	})
+}

+ 8 - 0
api/tabBar/shoppingCart.js

@@ -24,6 +24,14 @@ export function generateOrderLimit(data) {
 		data
 	})
 }
+// 购物车生成销售单-共享版
+export function generateOrderShare(data) {
+	return http.request({
+		url: '/blade-sales-part/shoppingCart/generateOrderShare',
+		method: 'POST',
+		data
+	})
+}
 // 删除购物车商品
 export function shoppingCartUpdate(data) {
 	return http.request({

+ 7 - 0
api/views/personalInformation/index.js

@@ -62,3 +62,10 @@ export function appDetailsV1(params) {
 	params
   })
 }
+export function corpPointsDetail(params) {
+  return http.request({
+    url: '/blade-sales-part/integraldetailPj/corpPointsDetail',
+    method: 'get',
+	params
+  })
+}

+ 4 - 4
common/setting.js

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

+ 2 - 2
manifest.json

@@ -1,5 +1,5 @@
 {
-    "name" : "长春极速达盛旗轮胎",
+    "name" : "武汉特好卖总仓",
     "appid" : "__UNI__487FA21",
     "description" : "",
     "versionName" : "1.0.53",
@@ -125,7 +125,7 @@
     "quickapp" : {},
     /* 小程序特有相关 */
     "mp-weixin" : {
-        "appid" : "wx0b62384a4d454654",
+        "appid" : "wx8cad72583ab475bd",
         "setting" : {
             "urlCheck" : false,
             "postcss" : true,

+ 9 - 2
pages.json

@@ -80,16 +80,23 @@
 
 		},
 		{
+			"path": "pages/tabBar/integralList/index",
+			"style": {
+				"navigationBarTitleText": "我的积分",
+				"enablePullDownRefresh": false
+			}
+		},
+		{
 			"path": "pages/tabBar/integralList/exchangeRecords",
 			"style": {
-				"navigationBarTitleText": "积分兑换记录",
+				"navigationBarTitleText": "使用积分明细",
 				"enablePullDownRefresh": false
 			}
 		},
 		{
 			"path": "pages/tabBar/integralList/obtainRecord",
 			"style": {
-				"navigationBarTitleText": "积分获取记录",
+				"navigationBarTitleText": "产生积分明细",
 				"enablePullDownRefresh": false
 			}
 

+ 0 - 1
pages/integralMall/home.vue

@@ -113,7 +113,6 @@
 		appList,
 		userDept,
 		validationCorpEmpty,
-
 		brandDescList,
 		brandDescDetail
 	} from '@/api/tabBar/home.js'

+ 6 - 6
pages/tabBar/center.vue

@@ -49,13 +49,13 @@
 				<u-cell title="车型" :titleStyle="{marginLeft: '20rpx'}" :iconStyle="{fontSize:'40rpx'}" :isLink="true"
 					center @click="clickVehicle"></u-cell>
 				<!-- <u-cell title="积分商城" :titleStyle="{marginLeft: '20rpx'}" :iconStyle="{fontSize:'40rpx'}" :isLink="true"
-					center @click="clickPointsMall"></u-cell>
-				<u-cell title="积分兑换记录" :titleStyle="{marginLeft: '20rpx'}" :iconStyle="{fontSize:'40rpx'}"
+					center @click="clickPointsMall"></u-cell> -->
+				<u-cell title="我的积分" :titleStyle="{marginLeft: '20rpx'}" :iconStyle="{fontSize:'40rpx'}"
 					:isLink="true" center @click="RedemptionOfPoints"></u-cell>
-				<u-cell title="积分获取记录" :titleStyle="{marginLeft: '20rpx'}" :iconStyle="{fontSize:'40rpx'}"
+				<!-- <u-cell title="积分获取记录" :titleStyle="{marginLeft: '20rpx'}" :iconStyle="{fontSize:'40rpx'}"
 					:isLink="true" center @click="obtainRecord"></u-cell> -->
-				<u-cell title="额度消费记录" :titleStyle="{marginLeft: '20rpx'}" :iconStyle="{fontSize:'40rpx'}"
-					:isLink="true" center @click="consumptionRecord"></u-cell>
+				<!-- <u-cell title="额度消费记录" :titleStyle="{marginLeft: '20rpx'}" :iconStyle="{fontSize:'40rpx'}"
+					:isLink="true" center @click="consumptionRecord"></u-cell> -->
 				<!-- <u-cell title="联系客服" :titleStyle="{marginLeft: '20rpx'}" :iconStyle="{fontSize:'40rpx'}" :isLink="true"
 					center @click="clickCall"></u-cell> -->
 				<u-cell title="设置" :titleStyle="{marginLeft: '20rpx'}" :iconStyle="{fontSize:'40rpx'}" :isLink="true"
@@ -139,7 +139,7 @@
 			},
 			// 积分兑换记录
 			RedemptionOfPoints() {
-				this.$u.route('/pages/tabBar/integralList/exchangeRecords');
+				this.$u.route('/pages/tabBar/integralList/index');
 			},
 			// 积分获取记录
 			obtainRecord() {

+ 4 - 21
pages/tabBar/home.vue

@@ -63,7 +63,8 @@
 				</u-grid> -->
 			</view>
 			<view @click="inIntegralMall">
-				<u-swiper :list="list4" indicator indicatorMode="dot" circular imgMode='scaleToFill'  :height="80"></u-swiper>
+				<image src="../../static/images/tabBar/JFStop.png" style="width: 100%;height: 220rpx;"
+					mode="scaleToFill"></image>
 			</view>
 			<view style="margin-top: 10rpx;display: flex;justify-content: space-between;width: 100%;">
 				<u-tabs :list="dianjiqielist" v-model="groupModel" @click="groupChange"></u-tabs>
@@ -152,7 +153,7 @@
 
 		brandDescList,
 		brandDescDetail
-	} from '@/api/tabBar/home.js'
+	} from '@/api/tabBar/homeNew.js'
 	import {
 		shoppingCartList
 	} from '@/api/tabBar/shoppingCart.js'
@@ -179,7 +180,6 @@
 				status: 'loadmore',
 				dataList: [],
 				list3: [],
-				list4: [],
 				brandList: [],
 				// 静音棉
 				originalFactory: 0,
@@ -278,28 +278,11 @@
 				brandDescDetail({
 					id: res.data.records[0].id
 				}).then(res => {
-					console.log(res, 193);
-					// this.list3 = res.data.brandFilesList
 					this.list3 = res.data.brandFilesList.map(item => {
 						return item.url
 					})
 				})
 			})
-			// 轮播图
-			brandDescList({
-				type: 'LBT',
-				whetherIntegral: "1"
-			}).then(res => {
-				brandDescDetail({
-					id: res.data.records[0].id
-				}).then(res => {
-					console.log(res, 193);
-					// this.list3 = res.data.brandFilesList
-					this.list4 = res.data.brandFilesList.map(item => {
-						return item.url
-					})
-				})
-			})
 			uni.showLoading({
 				title: '加载中',
 				mask: true
@@ -634,7 +617,7 @@
 		background: #fff;
 		border-radius: 12rpx;
 		width: 100%;
-		padding: 40rpx;
+		padding: 20rpx 20rpx 0 20rpx;
 		box-sizing: border-box;
 
 		.classificationBox {

+ 88 - 44
pages/tabBar/integralList/exchangeRecords.vue

@@ -3,70 +3,107 @@
 		<view class="cardBox" v-for="item in data" :key="item.id">
 			<view class="nameBox">
 				<view class="codeBox">{{item.srcNo}}</view>
-				<view class="timeBox">{{item.paymentDate.slice(0,10)}}</view>
+				<view class="timeBox">{{item.createTime}}</view>
+			</view>
+			<view class="goodsBox">
+				<view>
+					类型
+				</view>
+				<view>
+					{{item.type?item.type:'—'}}
+				</view>
+			</view>
+			<view class="goodsBox">
+				<view>
+					商品名称
+				</view>
+				<view>
+					{{item.goodsName?item.goodsName:'—'}}
+				</view>
+			</view>
+			<view class="goodsBox">
+				<view>
+					积分
+				</view>
+				<view>
+					{{item.integral}}
+				</view>
 			</view>
-			<view class="goodsBox">{{item.goodsName}}</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" />
+		<!-- <u-loadmore v-if="page.total !== 0 && data.length != 0" :status="status" /> -->
 	</view>
 </template>
 
 <script>
-	import {integralExchangeRecord} from '@/api/tabBar/integral.js'
+	import {
+		integralExchangeRecord
+	} from '@/api/tabBar/integral.js'
+	import {
+		details,
+		corpPointsDetail
+	} from '@/api/views/personalInformation/index.js'
 	export default {
-		data(){
+		data() {
 			return {
-				page: {
-					current: 1,
-					size: 10,
-					total: 0,	
-				},
-				data:[],
-				status: 'loadmore',
-				userInfo:{}, // 当前登录人信息
+				// page: {
+				// 	current: 1,
+				// 	size: 10,
+				// 	total: 0,	
+				// },
+				data: [],
+				// status: 'loadmore',
+				// userInfo:{}, // 当前登录人信息
 			}
 		},
 		onLoad() {
-			this.userInfo = uni.getStorageSync('userInfo')
-			this.integralExchangeRecordfun()
+			// this.userInfo = uni.getStorageSync('userInfo')
+			// this.integralExchangeRecordfun()
+			details().then(res => {
+				console.log(res)
+				corpPointsDetail({
+					corpId: res.data.id
+				}).then(res => {
+					this.data = res.data.integralDetailListS
+				})
+			})
 		},
 		onShow() {
-			
+
 		},
 		onReachBottom() {
-			this.status = 'loading'
-			if (this.data.length < this.page.total) {
-				this.page.current++
-				this.integralExchangeRecordfun()
-			} else {
-				this.status = 'nomore'
-			}
+			// this.status = 'loading'
+			// if (this.data.length < this.page.total) {
+			// 	this.page.current++
+			// 	this.integralExchangeRecordfun()
+			// } else {
+			// 	this.status = 'nomore'
+			// }
 		},
-		methods:{
+		methods: {
 			// 获取列表数据
-			integralExchangeRecordfun(){
-				uni.showLoading({
-					title: '加载中',
-					mask: true
-				});
-				integralExchangeRecord({
-					current:this.page.current,
-					size:this.page.size,
-				}).then(res=>{
-					this.data = this.data.concat(res.data.records)
-					this.page.total = res.data.total
-					if (this.data.length == res.data.total) {
-						this.status = 'nomore'
-					}
-					uni.hideLoading();
-				}).catch(err => {
-					uni.hideLoading();
-				})
-			}
+			// integralExchangeRecordfun(){
+			// 	uni.showLoading({
+			// 		title: '加载中',
+			// 		mask: true
+			// 	});
+			// 	integralExchangeRecord({
+			// 		current:this.page.current,
+			// 		size:this.page.size,
+			// 	}).then(res=>{
+			// 		this.data = this.data.concat(res.data.records)
+			// 		this.page.total = res.data.total
+			// 		if (this.data.length == res.data.total) {
+			// 			this.status = 'nomore'
+			// 		}
+			// 		uni.hideLoading();
+			// 	}).catch(err => {
+			// 		uni.hideLoading();
+			// 	})
+			// }
 		}
 	}
 </script>
@@ -76,29 +113,36 @@
 		width: 94%;
 		margin: 0 auto;
 	}
+
 	.cardBox {
 		background: #fff;
 		padding: 20rpx;
 		border-radius: 20rpx;
 		margin-top: 20rpx;
 	}
+
 	.nameBox {
 		display: flex;
 		align-items: center;
 		justify-content: space-between;
+
 		.codeBox {
 			font-size: 34rpx;
 			font-weight: 500;
 		}
+
 		.timeBox {
 			font-size: 28rpx;
 			color: #bababa;
 			font-weight: 400;
 		}
 	}
+
 	.goodsBox {
-		
+		display: flex;
+		justify-content: space-between;
 	}
+
 	.describeBox {
 		font-size: 30rpx;
 		color: #bababa;

+ 152 - 0
pages/tabBar/integralList/index.vue

@@ -0,0 +1,152 @@
+<template>
+	<view class="viewBox">
+		<!-- <view class="cardBox">
+			<view class="goodsBox">
+				<view>
+					产生积分
+				</view>
+				<view>
+					{{form.addPoints}}
+				</view>
+			</view>
+			<view class="goodsBox">
+				<view>
+					使用积分
+				</view>
+				<view>
+					{{form.subPoints}}
+				</view>
+			</view>
+			<view class="goodsBox">
+				<view>
+					余额
+				</view>
+				<view>
+					{{form.pointsBalance}}
+				</view>
+			</view>
+		</view> -->
+		<u-cell-group>
+			<u-cell title="产生积分" :value="form.addPoints" isLink url="/pages/tabBar/integralList/obtainRecord"></u-cell>
+			<u-cell title="使用积分" :value="form.subPoints" isLink
+				url="/pages/tabBar/integralList/exchangeRecords"></u-cell>
+			<u-cell title="余额" :value="form.pointsBalance"></u-cell>
+		</u-cell-group>
+	</view>
+</template>
+
+<script>
+	import {
+		integralExchangeRecord
+	} from '@/api/tabBar/integral.js'
+	import {
+		details,
+		corpPointsDetail
+	} from '@/api/views/personalInformation/index.js'
+	export default {
+		data() {
+			return {
+				// page: {
+				// 	current: 1,
+				// 	size: 10,
+				// 	total: 0,	
+				// },
+				data: [],
+				// status: 'loadmore',
+				// userInfo:{}, // 当前登录人信息
+				form: {}
+			}
+		},
+		onLoad() {
+			// this.userInfo = uni.getStorageSync('userInfo')
+			// this.integralExchangeRecordfun()
+			details().then(res => {
+				uni.setNavigationBarTitle({
+					title: res.data.cname
+				});
+				corpPointsDetail({
+					corpId: res.data.id
+				}).then(res => {
+					this.form = res.data
+				})
+			})
+		},
+		onShow() {
+
+		},
+		onReachBottom() {
+			// this.status = 'loading'
+			// if (this.data.length < this.page.total) {
+			// 	this.page.current++
+			// 	this.integralExchangeRecordfun()
+			// } else {
+			// 	this.status = 'nomore'
+			// }
+		},
+		methods: {
+			// 获取列表数据
+			// integralExchangeRecordfun(){
+			// 	uni.showLoading({
+			// 		title: '加载中',
+			// 		mask: true
+			// 	});
+			// 	integralExchangeRecord({
+			// 		current:this.page.current,
+			// 		size:this.page.size,
+			// 	}).then(res=>{
+			// 		this.data = this.data.concat(res.data.records)
+			// 		this.page.total = res.data.total
+			// 		if (this.data.length == res.data.total) {
+			// 			this.status = 'nomore'
+			// 		}
+			// 		uni.hideLoading();
+			// 	}).catch(err => {
+			// 		uni.hideLoading();
+			// 	})
+			// }
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.viewBox {
+		width: 100%;
+		margin: 0 auto;
+		background-color: #fff;
+	}
+
+	.cardBox {
+		background: #fff;
+		padding: 20rpx;
+		border-radius: 20rpx;
+		margin-top: 20rpx;
+	}
+
+	.nameBox {
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+
+		.codeBox {
+			font-size: 34rpx;
+			font-weight: 500;
+		}
+
+		.timeBox {
+			font-size: 28rpx;
+			color: #bababa;
+			font-weight: 400;
+		}
+	}
+
+	.goodsBox {
+		display: flex;
+		justify-content: space-between;
+	}
+
+	.describeBox {
+		font-size: 30rpx;
+		color: #bababa;
+		font-weight: 400;
+	}
+</style>

+ 80 - 46
pages/tabBar/integralList/obtainRecord.vue

@@ -3,70 +3,97 @@
 		<view class="cardBox" v-for="item in data" :key="item.id">
 			<view class="nameBox">
 				<view class="codeBox">{{item.srcNo}}</view>
-				<view class="timeBox">{{item.paymentDate.slice(0,10)}}</view>
+				<view class="timeBox">{{item.createTime}}</view>
 			</view>
-			<view class="goodsBox">{{item.goodsName}}</view>
-			<view class="describeBox">
-				{{item.remarks?item.remarks:''}}
+			<view class="goodsBox">
+				<view>
+					类型
+				</view>
+				<view>
+					{{item.type?item.type:'—'}}
+				</view>
+			</view>
+			<view class="goodsBox">
+				<view>
+					商品名称
+				</view>
+				<view>
+					{{item.goodsName?item.goodsName:'—'}}
+				</view>
+			</view>
+			<view class="goodsBox">
+				<view>
+					积分
+				</view>
+				<view>
+					{{item.integral}}
+				</view>
 			</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" />
+		<!-- <u-loadmore v-if="page.total !== 0 && data.length != 0" :status="status" /> -->
 	</view>
 </template>
 
 <script>
-	import {integralRecord} from '@/api/tabBar/integral.js'
+	import {
+		integralRecord
+	} from '@/api/tabBar/integral.js'
+	import {
+		details,
+		corpPointsDetail
+	} from '@/api/views/personalInformation/index.js'
 	export default {
-		data(){
+		data() {
 			return {
-				page: {
-					current: 1,
-					size: 10,
-					total: 0,	
-				},
-				data:[],
-				status: 'loadmore',
-				userInfo:{}, // 当前登录人信息
+				data: [],
 			}
 		},
 		onLoad() {
-			this.userInfo = uni.getStorageSync('userInfo')
-			this.integralRecordfun()
+			// this.userInfo = uni.getStorageSync('userInfo')
+			// this.integralRecordfun()
+			details().then(res => {
+				console.log(res)
+				corpPointsDetail({
+					corpId: res.data.id
+				}).then(res => {
+					this.data = res.data.integralDetailListA
+				})
+			})
 		},
 		onShow() {
-			
+
 		},
 		onReachBottom() {
-			this.status = 'loading'
-			if (this.data.length < this.page.total) {
-				this.page.current++
-				this.integralRecordfun()
-			} else {
-				this.status = 'nomore'
-			}
+			// this.status = 'loading'
+			// if (this.data.length < this.page.total) {
+			// 	this.page.current++
+			// 	this.integralRecordfun()
+			// } else {
+			// 	this.status = 'nomore'
+			// }
 		},
-		methods:{
+		methods: {
 			// 获取列表数据
-			integralRecordfun(){
-				uni.showLoading({
-					title: '加载中',
-					mask: true
-				});
-				integralRecord({
-					current:this.page.current,
-					size:this.page.size,
-				}).then(res=>{
-					this.data = this.data.concat(res.data.records)
-					this.page.total = res.data.total
-					if (this.data.length == res.data.total) {
-						this.status = 'nomore'
-					}
-					uni.hideLoading();
-				}).catch(err => {
-					uni.hideLoading();
-				})
-			}
+			// integralRecordfun(){
+			// 	uni.showLoading({
+			// 		title: '加载中',
+			// 		mask: true
+			// 	});
+			// 	integralRecord({
+			// 		current:this.page.current,
+			// 		size:this.page.size,
+			// 	}).then(res=>{
+			// 		this.data = this.data.concat(res.data.records)
+			// 		this.page.total = res.data.total
+			// 		if (this.data.length == res.data.total) {
+			// 			this.status = 'nomore'
+			// 		}
+			// 		uni.hideLoading();
+			// 	}).catch(err => {
+			// 		uni.hideLoading();
+			// 	})
+			// }
 		}
 	}
 </script>
@@ -76,29 +103,36 @@
 		width: 94%;
 		margin: 0 auto;
 	}
+
 	.cardBox {
 		background: #fff;
 		padding: 20rpx;
 		border-radius: 20rpx;
 		margin-top: 20rpx;
 	}
+
 	.nameBox {
 		display: flex;
 		align-items: center;
 		justify-content: space-between;
+
 		.codeBox {
 			font-size: 34rpx;
 			font-weight: 500;
 		}
+
 		.timeBox {
 			font-size: 28rpx;
 			color: #bababa;
 			font-weight: 400;
 		}
 	}
+
 	.goodsBox {
-		
+		display: flex;
+		justify-content: space-between;
 	}
+
 	.describeBox {
 		font-size: 30rpx;
 		color: #bababa;

+ 172 - 3
pages/tabBar/shoppingCart.vue

@@ -119,7 +119,8 @@
 		getCorpsAddr,
 		paramserviceDetail,
 		getParamservice,
-		isProcurement
+		isProcurement,
+		generateOrderShare
 	} from '@/api/tabBar/shoppingCart.js'
 	import {
 		registerRuntimeCompiler
@@ -416,7 +417,7 @@
 				})
 			},
 			// 立即支付
-			async submit() {
+			submit() {
 
 				if (this.selectedProduct.length == 0) {
 					uni.showToast({
@@ -428,6 +429,20 @@
 				if (this.inventoryfun(this.dataList)) {
 					return
 				}
+				isProcurement({
+					"param": "whether.open.share"
+				}).then(res => {
+					if (res.data == 1) {
+						//共享支付流程
+						this.sharedPayment()
+					} else {
+						//正常支付流程
+						this.normalPayment()
+					}
+				})
+			},
+			//原来支付流程
+			async normalPayment() {
 				if (this.companyValue.length > 0) {
 					let data = []
 					for (let item of this.companyValue) {
@@ -446,7 +461,6 @@
 					});
 					// 判断是否用额度支付
 					const personRef = await details()
-					console.log(personRef.data, 349);
 					const totalPrice = Number(this.totalPrice) + Number(this.totalFreight)
 					// 是否开通额度
 					getParamservice(1, 10, {
@@ -672,6 +686,161 @@
 
 				}
 			},
+			sharedPayment() {
+				if (this.companyValue.length > 0) {
+					let data = []
+					for (let item of this.companyValue) {
+						for (let ite of this.dataList) {
+							if (item == ite.name) {
+								data = data.concat(ite.list)
+							}
+						}
+					}
+					let obj = {
+						address: this.addres.belongtoarea + this.addres.detailedAddress,
+						shoppingCartList: data,
+					}
+					uni.showLoading({
+						title: '加载中',
+						mask: true
+					});
+					generateOrderShare(obj).then(res => {
+						// res.data.type=0
+						let generateOrderData = res.data
+						//小程序支付
+						if (res.data.type == '0') {
+							uni.requestPayment({
+								provider: "wxpay",
+								appId: generateOrderData.appId,
+								timeStamp: generateOrderData.timeStamp,
+								nonceStr: generateOrderData.nonceStr,
+								package: generateOrderData.package,
+								signType: generateOrderData.signType,
+								paySign: generateOrderData.paySign,
+								success(res) {
+									uni.showToast({
+										title: '支付成功',
+										mask: true,
+										duration: 2000
+									});
+									setTimeout(function() {
+										uni.hideLoading({
+											noConflict: true
+										});
+										// this_.refresh(res.data.data.id)
+									}, 1000);
+								},
+								fail(e) {
+									console.log(22222222);
+
+									uni.showToast({
+										title: "支付失败",
+										icon: 'none',
+										mask: true
+									});
+									setTimeout(function() {
+										uni.hideLoading({
+											noConflict: true
+										});
+										// this_.refresh(res.data.id)
+									}, 1000);
+								}
+							})
+						}
+						//收银台支付 'w06'
+						if (res.data.type == '1') {
+							wx.openEmbeddedMiniProgram({
+								appId: 'wxef277996acc166c3',
+								extraData: {
+									cusid: generateOrderData.cusid,
+									appid: generateOrderData.appid,
+									orgid: generateOrderData.orgid,
+									version: generateOrderData.version,
+									trxamt: generateOrderData.trxamt,
+									reqsn: generateOrderData.reqsn,
+									notify_url: generateOrderData.notify_url,
+									body: generateOrderData.body,
+									remark: generateOrderData.remark,
+									validtime: generateOrderData.validtime,
+									// limit_pay: generateOrderData.limit_pay,
+									limit_pay: "",
+									randomstr: generateOrderData.randomstr,
+									paytype: generateOrderData.paytype,
+									signtype: generateOrderData.signtype,
+									sign: generateOrderData.sign,
+								},
+								success: (a) => {
+									uni.hideLoading();
+								},
+								fail: (err) => {
+									uni.hideLoading();
+								}
+							})
+						}
+						//额度支付
+						if (res.data.type == '2') {
+							details().then(res => {
+								const personRef = res
+								const totalPrice = Number(this.totalPrice) + Number(this.totalFreight)
+								// 是否开通额度
+								isProcurement({
+									"param": "WeChat.shipping.notification"
+								}).then(res => {
+									if (personRef.data.ifLimitAmount == 1) {
+										// 额度是否够用
+										if (Number(personRef.data.limitAmount >= totalPrice)) {
+											// 额度
+
+											// this.payType='W06'
+											generateOrderLimit({
+												payType: res.data == 1 ? 'W11' : 'W06',
+												address: this.addres.belongtoarea +
+													this.addres
+													.detailedAddress,
+												list: data,
+											}).then(res => {
+												uni.hideLoading();
+												uni.showToast({
+													title: '支付成功',
+													mask: true,
+													duration: 2000
+												});
+												setTimeout(function() {
+													uni.hideLoading({
+														noConflict: true
+													});
+												}, 1000);
+												// 详情调用
+												shoppingCartList({
+													whetherIntegral: '0'
+												}).then(res => {
+													this.dataList = res.data
+													this.companyValueLength =
+														this.dataList.length
+												}).catch(err => {})
+											})
+										}
+									}
+								})
+							})
+						}
+					})
+				}
+			},
+			radioGroupChange(e) {
+				this.radiovalue = e
+				if (e.length == 0) {
+					this.companyValue = []
+				} else {
+					for (let li of this.dataList) {
+						if (!this.companyValue.includes(li.name)) {
+							this.companyValue.push(li.name)
+						}
+					}
+				}
+				this.inventoryfun(this.dataList)
+				this.statistics()
+			},
 			radioGroupChange(e) {
 				this.radiovalue = e
 				if (e.length == 0) {

+ 1 - 1
pages/views/buyGoods/commodityDetails.vue

@@ -224,7 +224,7 @@
 		appModifyPrice,
 		stockDescList,
 		stockDescListV1
-	} from '@/api/tabBar/home.js'
+	} from '@/api/tabBar/homeNew.js'
 	export default {
 		data() {
 			return {

+ 27 - 0
static/certificate/development/private.wx8cad72583ab475bd.key

@@ -0,0 +1,27 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIEpAIBAAKCAQEA2XYe+jAL6KdhB10HHgnB/ZIKwQ42nSVJkueaDoDYFp8oYsnl
+TpI9bYs3Z88rGaGyu3gx94Vj0NOaCHuVLyUNMCaGEvWy05T0w2cgzIvWujshEiQI
+1CHYOhs2HRy/U+ZHWWpz6ygg9CpfhxKaJJvUKvugZrhLrtFb1k9XC0ZC4swsjfrG
+peCKQJilPzMkcqWUsrnvPU7l9RViOBL2Mz5+anKk6QWZ3kbkjvcWFh501/vJ3k0S
+jRGaWvk0ijxQzuY42w6iviqeox0pB45ME//txtP5sDs+DgOkE0BcAR8jdzXrS2+M
+GHPA4qUV/nOH5O+AYsW+0WXljzRFDCqBaSdrhQIDAQABAoIBABesy3yThIhkyKSD
+lUXI7CzOHIueH4YGTDdJLbWMg3obA8uVjXh7ZWKquHJ91IRq3UmZsV7wT8ipcOih
+g8FpOEFYwFoKE9kDK46miKScSNlnnJccAzYNJTxWQBL1UUMyG+x5MXuVl9jdUB8l
+gFCiAnxXfsQQJnU259eyNZjNonSMcI63t1Od1E0arhhB9wA6omipiC2q9gyKV/MX
++KoX/cjgOTR6sVA+t1zucFTxAlQelU3t9GpOOSy1/oRO5vU3lBIogvmKuMbbbIY7
+ueFKJnUU9NgIZMpl5AtOqH5DbBQxK240cOUaovIAJ1Aaet8m97O/XRZJVEoY2rn5
+89lfHsECgYEA+M5jN+jmO5lrUhWlgrkNRgMoKkaGi6JaSrcSzB2GjCUoF3dtDD9q
+i9v28zLOUeAJto/irjDZAetmiwX2CPg3ACHwOekEHqcUuoqRethh/VVdxEfHCUfG
+uCnLgOwVfS3h5dAi8dC6mVHq6GOMb+LJM6U0nc8BL8Pm1kXkwM29CLUCgYEA37+5
+yPVpGyHr36H2bSeUH1mj5OzpKCVLGCuAsX3aZSAn2qrBbWcsuwWHyX+grSLAwwaK
+KzsU1582+2H+nqmi8MIjtwMWRV9gQDdM982AdJQ2z/D3ftZJm2Qsx/YTpcxHg1VX
+5q8SrAucYw5n+UXcJGLlqrowYJCrljZMuCC+qZECgYEA662cgHZluCjgZvXIPOaL
+czlET59UjWoxezqlXKHPNGtx6aCftA1SIL8w0jfbBeVhbgQnpfbxaIcSMDhqUR7G
+AqMjSce2tk5wLS9bFPFpCK5XTrjrCZhq3UIB2dJHnLbcl3Mr1sFwMBFPoefCPK2n
+BvvDtoRCTHuV6nx0bkm0eU0CgYEAimkS53KQk103iX6qbzmlkoMkNLAtR01Sl+AJ
+W0LMP/RVUxqAT0oczJCOQCK4ZYHzFnHMNRP2P7BZFca3+LRdfGvMJiE9vKpUY0US
+UtSIGxW4loeswoSSwhKE9SmPW+fzcRXxK12vwkfodQprXTNPDB81jZhh5sp3qpNq
+gBiZeVECgYBNg9iyA+BOUx/Vl6mWZceXo0Q0AV92NtsRryn5lbTiY5cFGVPijHY/
+vwsPInG+gPQqkmFbQUoVhUZz88Ctks/drS+rSTxlLTgiRf7bF1591cJwCBD24YQ6
+kjb4KYKxMlToEZZXXs2/8btfXidiJMrSrPJo/OfuEnlB34572hiNpw==
+-----END RSA PRIVATE KEY-----

+ 27 - 0
static/certificate/development/private.wxf37f32ee0d3a10a7.key

@@ -0,0 +1,27 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIEpQIBAAKCAQEAsrwSDGVJMNiYSIO/DdD1VB2GYJYdId49x9aan5zZZZQ5OPSL
+ufKH1ShJ30ukuwCCBgUA+iiTV7Qp04kcZcg+1uwbWCkqKhpP0Lw2/pokIDnG5FLu
+53dv9t6nQjOlz0osBxcJdo58327JDCoa7U5gnrtOwSXURO0d8k01dFZ4PVbdxfGq
+5Ac3g+1CTYzWauhUw/bq6v4FH5p7A8lYFEhMZeJzFFs2QKKVEMXdjkuka+GK1VX4
+JKL0fKB9sDfjNpxDmmByJ1qnSc6KG/ASexUIBbRWVasxA90S8e7F/0GxlHxAgFSA
+r+nAhChS50iBzHfwuy7Yzu5XkKPnanJHlV9AmQIDAQABAoIBAQCi75AEfNEcFle8
+w12H2tXKuJ+nrTEhjtgDNUAAAZytXVJM+aHnAZGSYAf3551kXDIsCqO5aQPpD/SR
+Qo0AvGuMwfCrjdtCRno8b1gzAZGtTv5hZrkjiV4oTxFq6Gpfbd51GCsoSPzNMtFU
+pY2mh6zNBzPkH/hCXWbPXFM+mxVB1EZnD/858ZI/2bPgbFSNweE2ksNFKwJ6LCJg
+7/6LM8HQYjArXCDX2oJf/868vIy+wqHkQzpmXY9T30oI4hzvfYe2a2mvTvH9HyDg
+w+CxENAmdIuMUrbQXkZg7LSU1nSKkz01FkKsUNJbC8uixBa+w2Hc2Pw5cXVEgi4H
+1d8WHEABAoGBAO3LgKnl/3U9jiKAGd8n5XAbw7RBilOGargP5A7yNN78IRA44Ew5
+o3oL1ETCCX6MGaotyGe1zbvUh0iDQ3I5zZaXbNP+RjkmVaKdwxNzLXklkIaFzQRR
+aMy7r9fgzxfxWfXSuN9dHRbSmSbXk3m63BRKNVFZ1M2zeiUrAPyYQV9BAoGBAMBr
+Doaj3x6eNpb7y1E8m5QzbT2whVlouJ7Vpp/zGl1aPm+NIgJZSZXmoZf9b35V6THM
+jZHmbz/ZZgDC6QkdDcm4jTCgIVBVCSlPZeTjfj75E0fJbkXGy2JTGJT8QgUiNZeQ
+3eTGToUIOdsZYAvCPhHHhLvlERx8iARLxDhKD2NZAoGBAKDJHglC+9UxNt77EQND
+va5tB4nlWvuZAqXMEN9ORBOWFWEbpAXGX1QRlYicTsEjR+M6q6v8UMy1KngMUVl1
+3h3561r4LlFMK1EWLSYElfW5QZzD8dj+lscADSkB1+WPis1dmyVkl1usMGQEFbKU
+d2S8vIpyHCKuPWPOTQ9+f41BAoGBAKLVtmxAn6AEmgP5v9zWon6vaqILET5RvfNE
+sQapL0WTCkVStVYxg3FkxJmgMstCHt8y0ReIX9szufuo9pbszG9KS8m7qZWW8PLR
+q1QhJQRbunJEx5orGpDx61qhg6leguXqBa4GGArCpFuDROGOlwJqyyxLNMjbpiuk
+hsBwBEe5AoGAD3+ggfhGhkIRzJ62AAVEg3JYJ8fNCpE5s572tqt0SQliEhBn32YU
+L3wfgPuoX22f5CK82yjYNDdAdmgvNXGguZV4cXeliYo1aogVa//nhhLrKW3lW1s2
+ebvVzCiMswX7A9H1FR00yVhzzLMhci8PrJh8VMXL8okvaYWcFoGaXBA=
+-----END RSA PRIVATE KEY-----

BIN
static/images/tabBar/JFStop.png