hmp 4 роки тому
батько
коміт
30b2d3c100

+ 2 - 2
assets/http/global.js

@@ -1,8 +1,8 @@
 let global = {}
 
 
-const application='prod'	
-// const application='dev'
+// const application='prod'	
+const application='dev'
 // const application='test'
 
 if (application == 'prod') {

+ 99 - 63
pages/consume/consume.vue

@@ -1,6 +1,6 @@
 <template>
 	<view>
-		<u-navbar :is-back="false" title=" " >
+		<u-navbar :is-back="false" title=" ">
 			<view class="margin-left-20 text-cut-1" style="width: 100%;z-index: 99;" @click="chooseLocation()">
 				<view v-if="$isEmpty(location)" @click.stop="$u.toast('暂无位置信息')">
 					<u-icon name="map-fill" color="#000" size="32"></u-icon>
@@ -12,22 +12,31 @@
 				</view>
 			</view>
 		</u-navbar>
+
 		<tabsSwiper @currentChange="currentChange" ref="tabsSwiper" activeColor="#efc232">
 			<view slot="swiper1">
-				<card1 :list="shopList" @filter="filter"></card1>
+				<mescroll-body :height="height" ref="mescrollRef" @init="mescrollInit" @down="downCallback"
+					@up="upCallback" :down="downOption" :up="upOption">
+					<card1 :list="shopList" @filter="filter"></card1>
+				</mescroll-body>
 			</view>
 			<view slot="swiper2">
-				<card2 :list="mallList"></card2>
+				<mescroll-body :height="height" ref="mescrollRef" @init="mescrollInit" @down="downCallback"
+					@up="upCallback" :down="downOption" :up="upOption">
+					<card2 :list="mallList"></card2>
+				</mescroll-body>
 			</view>
 		</tabsSwiper>
 	</view>
 </template>
 
 <script>
+	import MescrollMixin from "@/components/mescroll-body/mescroll-mixins.js";
 	import card2 from "./comps/card2.vue"
 	import card1 from "./comps/card1.vue"
 	import tabsSwiper from './comps/tabsSwiper.vue'
 	export default {
+		mixins: [MescrollMixin],
 		components: {
 			tabsSwiper,
 			card1,
@@ -39,100 +48,127 @@
 					background: '#FF9549'
 				},
 				location: '',
-				
+
 				//数据列表
-				shopList:[],
-				mallList:[],
+				list: [],
+				shopList: [],
+				mallList: [],
 				//当前taginedx
-				current:0,
-				
-				filterValue:''
+				current: 0,
+
+				filterValue: '',
+
+				downOption: {
+					use: false
+				}
 			}
 		},
 		onLoad() {
-			this.fetchList()
 			this.getLocaltion()
 		},
 		methods: {
-			filter(index){
-				this.filterValue=""
-				switch (index){
+			downCallback() {
+				setTimeout(() => {
+					uni.showToast({
+						title: "刷新成功",
+						icon: "none"
+					})
+					this.mescroll.resetUpScroll();
+				}, 1000)
+			},
+			upCallback(mescroll) {
+				try {
+					if (this.current == 0) {
+						this.fetchShopList(mescroll)
+					} else {
+						this.fetchMallList(mescroll)
+					}
+				} catch (e) {
+					this.mescroll.endErr()
+				}
+			},
+			filter(index) {
+				this.filterValue = ""
+				switch (index) {
 					case 1:
-						this.filterValue="sales"
+						this.filterValue = "sales"
 						break;
 					case 2:
-						this.filterValue="score"
+						this.filterValue = "score"
 						break;
 					default:
 						break;
 				}
-				this.fetchShopList()
-			},
-			fetchList(){
-				if (this.current==0) {
-					this.fetchShopList()
-				}else if (this.current==1) {
-					this.fetchMallList()
-				}
+				this.mescroll.resetUpScroll();
 			},
-			fetchShopList(){
-				let params={
-					auditStatus:'PASS'
+			async fetchShopList(mescroll) {
+				let params = {
+					current: mescroll.num,
+					size: mescroll.size,
+					auditStatus: 'PASS'
 				}
 				if (!this.$isEmpty(this.filterValue)) {
-					params.filter=this.filterValue
+					params.filter = this.filterValue
 				}
-				this.$api.shop.list(params).then(res=>{
-					this.shopList=res.data.records
-					this.$forceUpdate()
-					this.$refs.tabsSwiper.initSwiperHeight('.list0')
-				})
+				let res = await this.$api.shop.list(params)
+				let data = res.data.records
+				let total = res.data.total
+				mescroll.endBySize(data.length, total);
+				if (mescroll.num == 1) this.shopList = []; //如果是第一页需手动制空列表
+				this.shopList = this.shopList.concat(data); //追加新数据
+				this.$forceUpdate()
+				this.$refs.tabsSwiper.initSwiperHeight('.list0')
 			},
-			fetchMallList(){
-				let params={
-					auditStatus:'PASS'
+			async fetchMallList(mescroll) {
+				let params = {
+					current: mescroll.num,
+					size: mescroll.size,
+					auditStatus: 'PASS'
 				}
-				this.$api.mall.list(params).then(res=>{
-					this.mallList=res.data.records
-					this.$forceUpdate()
-					this.$refs.tabsSwiper.initSwiperHeight('.list1')
-				})
+				let res = await this.$api.mall.list(params)
+				let data = res.data.records
+				let total = res.data.total
+				mescroll.endBySize(data.length, total);
+				if (mescroll.num == 1) this.mallList = []; //如果是第一页需手动制空列表
+				this.mallList = this.mallList.concat(data); //追加新数据
+				this.$forceUpdate()
+				this.$refs.tabsSwiper.initSwiperHeight('.list1')
 			},
-			currentChange(index){
-				this.current=index
-				this.fetchList()
+			currentChange(index) {
+				this.current = index
+				this.mescroll.resetUpScroll();
 			},
-			getLocaltion(){
-				let _this=this
+			getLocaltion() {
+				let _this = this
 				uni.getLocation({
-				    type: 'gcj02 ',
-				    success: function (res) {
-						let params={
-							longitude:res.longitude,
-							latitude:res.latitude
+					type: 'gcj02 ',
+					success: function(res) {
+						let params = {
+							longitude: res.longitude,
+							latitude: res.latitude
 						}
-						_this.$u.vuex('vuex_location',params)
-						_this.$api.activity.getLocation(params).then(resp=>{
-							_this.location=resp.data.result.formatted_addresses.recommend
+						_this.$u.vuex('vuex_location', params)
+						_this.$api.activity.getLocation(params).then(resp => {
+							_this.location = resp.data.result.formatted_addresses.recommend
 						})
-				    },
+					},
 					fail: (err) => {
 						console.log(err);
 					}
 				});
 			},
-			chooseLocation(){
+			chooseLocation() {
 				console.log("选择位置");
-				let _this=this
+				let _this = this
 				uni.chooseLocation({
-				    success: function (res) {
-						let params={
-							longitude:res.longitude,
-							latitude:res.latitude
+					success: function(res) {
+						let params = {
+							longitude: res.longitude,
+							latitude: res.latitude
 						}
-						_this.$u.vuex('vuex_location',params)
-						_this.location=res.name
-				    },
+						_this.$u.vuex('vuex_location', params)
+						_this.location = res.name
+					},
 					fail: (err) => {
 						console.log(err);
 					}

+ 4 - 1
pages/test/test2.vue

@@ -8,9 +8,12 @@
 	export default {
 		data() {
 			return {
-				
+				result:{}
 			}
 		},
+		onLoad(options) {
+			this.result=JSON.parse(options.result)
+		},
 		methods: {
 			
 		}

+ 6 - 4
pages/webview/webview.vue

@@ -1,6 +1,8 @@
 <template>
 	<view>
-		<web-view src="https://test-m-stg.ppppoints.com/event/2019/blankPage/index.html?interCode=CYS0001&character=00&ipAddress=121.77.145.18&partnerId=S9990141&requestId=1454264898547634177386606_KB_001&reqTime=20211115095723&signType=MD5&type=mobile&version=1.0.0&mobile=19124812881&outTokenId=19124812881_out&outType=00&callbackUrl=https%3A%2F%2Fldt.guosen-fumao.cn%2Fh5%2F%23%2Fpages%2Ftest%2Ftest&channelSource=02000000&reserved1=&reserved2=&hmac=72ac713bbaeb99dcd8dce1904adffce1"></web-view>
+		<web-view
+			src="https://test-m-stg.ppppoints.com/event/2019/blankPage/index.html?interCode=CYS0001&character=00&ipAddress=121.76.139.240&partnerId=S9990141&requestId=1454264898547634177615945_KB_001&reqTime=20211115181904&signType=MD5&type=mobile&version=1.0.0&mobile=19124812883&outTokenId=19124812883_out&outType=00&callbackUrl=https%3A%2F%2Fldt.guosen-fumao.cn%2Fwapp%2Fauth.html&channelSource=02000000&reserved1=&reserved2=&hmac=884f85a9d8fcba3addce478b0e7e9ee7">
+		</web-view>
 		<!-- <web-view :src="url"></web-view> -->
 	</view>
 </template>
@@ -9,14 +11,14 @@
 	export default {
 		data() {
 			return {
-				url:''
+				url: ''
 			}
 		},
 		onLoad(options) {
-			this.url=options.url
+			this.url = options.url
 		},
 		methods: {
-			
+
 		}
 	}
 </script>

+ 1 - 2
pagesA/pages/bill/my-bills.vue

@@ -104,9 +104,8 @@
 					payStatus:'付款成功'
 				}
 				if (this.defaultTime) {
-					params.createTime = this.$dateTime.format(new Date(this.defaultTime))
+					params.yearMoth = this.$dateTime.format(new Date(this.defaultTime))
 				}
-				
 				try {
 					this.$api.bills.list(params).then(res => {
 						let data = res.data.records

+ 25 - 9
pagesB/pages/agent/agentDetail.vue

@@ -1,43 +1,59 @@
 <template>
 	<view>
 		<back></back>
-		<u-image @load="load" src="https://music.nanyue6688.com/obsfile/720d776848ac43b9a128c7068a460603-detail.png" mode="widthFix"></u-image>
+		<u-image @load="load" :src="src"
+			mode="widthFix"></u-image>
 		<view v-if="show" class="bottom-bar" style="background-color: #5034c5;margin-top: -30rpx;">
-			<button class="cu-btn round text-bold" style="width: 100%;height: 100upx;font-size: 36upx;background-color: #f9b12b;color: #5034C6;" @click="nav">加入代理</button>
+			<button class="cu-btn round text-bold"
+				style="width: 100%;height: 100upx;font-size: 36upx;background-color: #f9b12b;color: #5034C6;"
+				@click="nav">加入代理</button>
 		</view>
+		<loading ref="loading" type="3" />
 	</view>
 </template>
 
 <script>
 	import back from "../../comps/back.vue"
 	export default {
-		components:{
+		components: {
 			back
 		},
 		data() {
 			return {
-				show:false
+				src:'',
+				show: false
 			}
 		},
 		onLoad(options) {
+			this.$refs.loading.showLoading()
+			this.fetchDetail()
 			if (this.$isNotEmpty(options.scene)) {
-				let salesmanId=decodeURIComponent(options.scene)
-				salesmanId && this.$cache.put('salesmanId',salesmanId)
+				let salesmanId = decodeURIComponent(options.scene)
+				salesmanId && this.$cache.put('salesmanId', salesmanId)
 			}
 		},
 		methods: {
+			fetchDetail() {
+				let params = {
+					paramKey: 'agent_detail' || '-1'
+				}
+				this.$api.wxApp.appParams(params).then(res => {
+					this.src=res.data.paramValue
+				})
+			},
 			nav() {
 				uni.navigateTo({
 					url: "agent"
 				})
 			},
-			load(){
-				this.show=true
+			load() {
+				this.show = true
+				this.$refs.loading.hide()
 			}
 		}
 	}
 </script>
 
 <style lang="scss" scoped>
-	
+
 </style>

+ 1 - 1
pagesB/pages/agent/pay.vue

@@ -83,7 +83,7 @@
 				}
 				let params = {
 					orderType: this.$global.orderType.AGENT_CHARGE,
-					orderId: resp.data.id,
+					orderId: resp.data.tradeNo,
 					payStatus: this.$global.payStatus.IS_WAIT
 				}
 				let res = await this.$api.pay.payOrder(params)

+ 2 - 2
pagesD/pages/menu/menu.vue

@@ -292,8 +292,8 @@
 					"sendingPrice": 0, // 商家配送费
 					"packingPrice": 0, // 包装费
 					"sendingNeedLeastPrice": 0, // 起送需要的最低价格
-					"businessStartTime": '09:00:00', // 营业开始时间, 开始的点必须在结束之前
-					"businessEndTime": '19:00:00', // 营业结束时间
+					"businessStartTime": '', // 营业开始时间, 开始的点必须在结束之前
+					"businessEndTime": '', // 营业结束时间
 					"shopStatus": true, // 商家营业状态
 					"shopNotice": '', // 公告
 				},