hmp 4 yıl önce
ebeveyn
işleme
7366900cad
59 değiştirilmiş dosya ile 2480 ekleme ve 473 silme
  1. 38 4
      assets/http/api.js
  2. 5 0
      assets/http/config.js
  3. 117 0
      components/alert/exchangeSuccess.vue
  4. 3 4
      components/alert/votePopup.vue
  5. 13 8
      components/alert/voteSuccess.vue
  6. 1 1
      components/login.vue
  7. 17 19
      components/poster/poster.vue
  8. 304 0
      components/u-city-select.vue
  9. 86 75
      manifest.json
  10. 56 25
      pages.json
  11. 83 61
      pages/activity/activityDetail.vue
  12. 328 0
      pages/address/add.vue
  13. 188 0
      pages/address/address.vue
  14. 1 11
      pages/endorsement/endorsement.vue
  15. 12 7
      pages/index/home.vue
  16. 11 21
      pages/introduce/notice.vue
  17. 1 1
      pages/mine/info/info.vue
  18. 195 0
      pages/mine/logistics/logistics.vue
  19. 35 17
      pages/mine/mine.vue
  20. 37 32
      pages/mine/my-help/help-records.vue
  21. 9 10
      pages/mine/my-help/my-help.vue
  22. 15 9
      pages/mine/my-product/my-product.vue
  23. 143 0
      pages/mine/order/comps/card.vue
  24. 115 0
      pages/mine/order/comps/item.vue
  25. 244 0
      pages/mine/order/detail.vue
  26. 96 0
      pages/mine/order/order.vue
  27. 14 12
      pages/mine/points/pointsDetail.vue
  28. 4 4
      pages/rank/rank.vue
  29. 1 11
      pages/rule/point.vue
  30. 1 11
      pages/rule/rule.vue
  31. 232 97
      pages/shop/detail.vue
  32. 31 22
      pages/shop/shop.vue
  33. 1 1
      pages/webview/auth_result.vue
  34. BIN
      static/icon/divider.png
  35. BIN
      static/icon/empty.png
  36. BIN
      static/kd/EMS.png
  37. BIN
      static/kd/HHTT.png
  38. BIN
      static/kd/HTKY.png
  39. BIN
      static/kd/JD.png
  40. BIN
      static/kd/SF.png
  41. BIN
      static/kd/STO.png
  42. BIN
      static/kd/YD.png
  43. BIN
      static/kd/YTO.png
  44. BIN
      static/kd/YZPY.png
  45. BIN
      static/kd/ZTO.png
  46. BIN
      static/kd/kd.png
  47. BIN
      static/logo.png
  48. BIN
      static/mine/kefu.png
  49. BIN
      static/test/auth.jpg
  50. BIN
      static/test/avatar.png
  51. BIN
      static/test/bg.jpg
  52. BIN
      static/test/goods.png
  53. BIN
      static/test/jingcha.jpg
  54. BIN
      static/test/test.png
  55. 5 3
      uni_modules/mescroll-uni/components/mescroll-body/mescroll-body.vue
  56. 2 2
      uni_modules/mescroll-uni/components/mescroll-diy/xinlang/mescroll-uni-option.js
  57. 1 1
      uni_modules/mescroll-uni/components/mescroll-empty/mescroll-empty.vue
  58. 4 4
      uni_modules/mescroll-uni/components/mescroll-uni/mescroll-uni-option.js
  59. 31 0
      utils/mpi.js

+ 38 - 4
assets/http/api.js

@@ -16,9 +16,10 @@ const platform = {
 }
 
 const activity = {
-	getPromoteNum: p => http.get('sing_active/activerecord/getPromoteNum', {params:p}),
+	getPromoteNum: p => http.get('app/active/help', {params:p}),
 	getWorksList: p => http.get('/app/active/product/sortList', {params:p}),
 	sortListQuery: p => http.get('/app/active/product/sortListQuery', {params:p}),
+	indexList: p => http.get('app/active/product/list', {params:p}),
 	searchWork: p => http.get('/app/active/product/search', {params:{keyword: p}}),
 	getWorksDetail: id => http.get('/sing_active/activeproductrecord/detail', {params:{id}}),
 	list: p => http.get('/sing_active/activeproductrecord/list', {params:p}),
@@ -47,6 +48,8 @@ const loginUser={
 	submit:p => http.post('sing_user/loginuser/submit', p),
 	login:p => http.post('/user/login/login', p),
 	detail:p => http.get('sing_user/loginuser/detail', {params:p}),
+	userHeatValueAndPufaPoint:p => http.get('/user/login/userHeatValueAndPufaPoint', {params:p}),
+	
 }
 
 
@@ -75,8 +78,19 @@ const heatrecord={
  */
 const pointgoods={
 	list:p => http.get('sing_goods/pointgoods/list', {params:p}),
+	exchange:p => http.post('app/point/exchange',p,{header:{'Content-Type':'application/x-www-form-urlencoded'}}),
 }
 
+/**
+ * 兑换记录
+ */
+const goodsorder={
+	list:p => http.get('sing_goods/goodsorder/list', {params:p}),
+	detail:p => http.get('sing_goods/goodsorder/detail', {params:p}),
+	submit:p => http.post('sing_goods/goodsorder/submit', p),
+}
+
+
 /**
  * 道具
  */
@@ -89,8 +103,26 @@ const order={
 /**
  * 用户地址
  */
-const address={
-	list:p => http.get('sing_user/useraddress/list', {params:p}),
+const address = {
+	list: p => http.get("sing_user/useraddress/list", {
+		params: p
+	}),
+	detail: p => http.get("sing_user/useraddress/detail", {
+		params: p
+	}),
+	submit: p => http.post('sing_user/useraddress/submitAddress', p),
+	//获取地址信息
+	getLocation: p => http.get("sing_user/useraddress/getLocation", {
+		params: p
+	}),
+}
+
+/**
+ * 字典地址
+ */
+const area={
+	province: p => http.get('blade-system/region/lazy-tree?parentCode=00', {params: p}),
+	list:p => http.get('blade-system/region/lazy-tree', {params: p}),
 }
 
 
@@ -106,7 +138,9 @@ export const api={
 	heatrecord,
 	CMCC,
 	pointgoods,
+	goodsorder,
 	order,
 	address,
-	notice
+	notice,
+	area
 }

+ 5 - 0
assets/http/config.js

@@ -8,6 +8,11 @@ config.transformDomains = 'https://m.changyoyo.com'
 //普通二维码跳作品详情链接
 config.PRODUCT_PATH='https://vote.guosen-fumao.cn/home',
 
+config.kdniao={
+	appId:'1709349',
+	appKey:'4d07512e-6516-4413-b82a-c68228111119'
+}
+
 config.themeRed = {
 	skin: '--bgColor:#e72226;--color:#fff;--shopBg:#f24050;--shopRule:#FF797F',
 	theme: {

+ 117 - 0
components/alert/exchangeSuccess.vue

@@ -0,0 +1,117 @@
+<template>
+	<view>
+		<u-popup :custom-style="popupStyle" :closeable="true" close-icon-size="40" close-icon-color="#fff" close-icon="close-circle"
+			class="auth-point" v-model="show" mode="center" width="70%" border-radius="28">
+			<view class="auth-bg">
+				<image style="width: 100%;" src="../../static/poster/votesuccess.png" mode="widthFix"></image>
+				<view class="avatar-vote flex justify-center align-center">
+					<u-avatar size="159" :src="avatar"></u-avatar>
+				</view>
+				<view class="info-box">
+					<view class="main-info">兑换商品成功</view>
+					<view class="sub-info" style="padding: 0 50rpx;">
+						您可以在个人中心的我的兑换里查看所兑换的商品
+					</view>
+					<view class="flex justify-center" style="margin-top: 90rpx;">
+						<u-button @click="show=false" shape="circle" :custom-style="customStyle">继续兑换</u-button>
+						<u-button shape="circle" :custom-style="customStyle" @click="view">立即查看</u-button>
+					</view>
+				</view>
+			</view>
+		</u-popup>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				show: false,
+				avatar: '',
+				popupStyle: {
+					'u-mode-center-box': 'red'
+				},
+				customStyle: {
+					color: 'white',
+					background: "#E72226",
+					width: '200rpx',
+					margin: '10rpx',
+					height: "60rpx",
+					fontSize: "26rpx"
+				}
+			};
+		},
+
+		methods: {
+			toIndex() {
+				uni.switchTab({
+					url: "/pages/index/home"
+				})
+			},
+			showSuccess(avatar) {
+				this.avatar = avatar;
+				this.show = true;
+			},
+			hide() {
+				this.show = false;
+			},
+			support() {
+				this.hide()
+				this.$emit('support')
+			},
+			view(){
+				uni.navigateTo({
+					url:"/pages/mine/order/order"
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.auth-bg {
+		width: 100%;
+		background: transparent;
+	}
+
+	.auth-msg {
+		padding: 40rpx 40rpx 20rpx 40rpx;
+		display: flex;
+		align-items: center;
+		justify-content: left;
+	}
+
+	.avatar-vote {
+		position: absolute;
+		width: 200rpx;
+		height: 200rpx;
+		top: 100rpx;
+		left: calc(50% - 100rpx);
+		border: 2px dashed #E8E8E8;
+		border-radius: 50%;
+	}
+
+	.info-box {
+		position: absolute;
+		width: 100%;
+		height: auto;
+		top: 360rpx;
+		left: 0;
+
+		.main-info {
+			margin: 10rpx;
+			font-size: 30rpx;
+			color: #353535;
+			font-weight: 800;
+			text-align: center;
+		}
+
+		.sub-info {
+			margin: 15rpx auto 40rpx auto;
+			text-align: center;
+			color: #AAAAAA;
+			font-size: 24rpx;
+			font-weight: 400;
+		}
+	}
+</style>

+ 3 - 4
components/alert/votePopup.vue

@@ -3,10 +3,9 @@
 		<u-popup v-model="show" mode="bottom" width="100%" height="750" border-radius="15" :closeable="true">
 			<view class="padding-30">
 				<view class="padding-top-20 text-bold text-xl">投票助力</view>
-				<view class="padding-top-10 padding-bottom-10"
-					style="color: #353535;font-size: 22rpx;font-family: PingFang-SC-Medium;line-height: 42rpx;">
-					中国移动用户可使用移动积分兑换活力道具,兑换后可获得移动为你发起{{gitfs[selected].activeVote}}
-					人助力和{{vuex_active_setting.voteAndPointRate*gitfs[selected].activeVote}}个普法积分(可用于积分商城兑换商品),快为喜爱的作品加油助力吧
+				<view 
+					style="color: #888888;font-size: 22rpx;font-family: PingFang-SC-Medium;line-height: 36rpx;padding: 20rpx 0;">
+					{{gitfs[selected].content}}
 				</view>
 				<scroll-view style="white-space: nowrap;" :scroll-x="true">
 					<view v-for="(item,index) in gitfs" :key="index" class="gift-item">

+ 13 - 8
components/alert/voteSuccess.vue

@@ -1,14 +1,16 @@
 <template>
 	<view>
-		<u-popup :custom-style="popupStyle" class="auth-point" v-model="show" mode="center" width="70%" border-radius="25" >
+		<u-popup :custom-style="popupStyle" class="auth-point" v-model="show" mode="center" width="70%" border-radius="28" >
 			<view class="auth-bg">
 				<image style="width: 100%;" src="../../static/poster/votesuccess.png" mode="widthFix"></image>
 				<view class="avatar-vote flex justify-center align-center">
 					<u-avatar size="159" :src="avatar"></u-avatar>
 				</view>
 				<view class="info-box">
-					<view class="main-info">成功为该作品助力{{voteCount}}热力</view>
-					<view class="sub-info">你已获取{{pointNum}}普法积分,可用于积分商城兑换</view>
+					<view class="main-info">成功为该作品助力{{activeVote}}票</view>
+					<view class="sub-info" style="padding: 0 20rpx;">
+						你已获得{{vuex_active_setting.voteAndPointRate * activeVote}}个普法积分,可用于"积分换礼"兑换礼品哦
+					</view>
 					<view class="flex justify-center" style="margin-top: 90rpx;">
 						<u-button  @click="show=false" shape="circle" :custom-style="customStyle">继续投票</u-button>
 						<u-button  shape="circle" :custom-style="customStyle" @click="support">为TA拉票</u-button>
@@ -25,8 +27,7 @@
 		data() {
 			return {
 				show: false,
-				voteCount: 1,
-				pointNum: 1,
+				activeVote: 1,
 				avatar: 'https://thirdwx.qlogo.cn/mmopen/vi_32/9UQvP3rrVDeMwwjSaaeXIJ2NBdKAB1SpVP8ozRxWiaDDHGJFSp0iaibclAlBeSKGMSOEVvGTia404po8yQ4ibDutO3A/132',
 				popupStyle: {
 					'u-mode-center-box': 'red'
@@ -43,10 +44,14 @@
 		},
 
 		methods: {
-			showSuccess(avatar,voteCount,pointNum){
+			toIndex(){
+				uni.switchTab({
+					url:"/pages/index/home"
+				})
+			},
+			showSuccess(avatar,activeVote){
 				this.avatar = avatar;
-				this.voteCount = voteCount;
-				this.pointNum = pointNum;
+				this.activeVote = activeVote;
 				this.show = true;
 			},
 			hide(){

+ 1 - 1
components/login.vue

@@ -176,7 +176,7 @@
 							this.showPhoneModal()
 						}else{
 							if (!this.notToast) {
-								this.$refs.toast.info('登录成功')
+								this.$u.toast('登录成功')
 							}
 						}
 						//登录成功

+ 17 - 19
components/poster/poster.vue

@@ -7,7 +7,7 @@
 
 		<view class="btn" v-if="imgLoad">
 			<view class="save-btn" @click.stop="saveImage">保存图片</view>
-			<view class="save-btn" @click.stop="goLottery" v-if="subTitle"> 去抽奖 </view>
+			<!-- <view class="save-btn" @click.stop="goLottery" v-if="subTitle"> 去抽奖 </view> -->
 		</view>
 
 		<canvas style="position: fixed;top: 999999999rpx;" @click.stop=""
@@ -20,7 +20,7 @@
 		props: {
 			headerImg: {
 				type: String,
-				default: 'https://vote.guosen-fumao.cn/obsfile/a9d4b65ba1cd4bc88ef9da08cb8fcd26-poster.jpg'
+				default: 'https://vote.guosen-fumao.cn/obsfile/fa4631ad16f64357a4ec84c81064102d-%E5%88%86%E4%BA%AB%E6%B5%B7%E6%8A%A5.jpg'
 			},
 			avatar: {
 				type: String,
@@ -63,9 +63,8 @@
 				this.imgLoad = true
 			},
 			//显示
-			showCanvas(qrcode) {
+			showCanvas() {
 				this.isShow = true
-				this.qrcode = qrcode
 				this.__init()
 			},
 			//初始化画布
@@ -97,7 +96,7 @@
 				this.drawRoundImg(this.ctx, avatar.path, (hW - aW) / 2, uni.upx2px(222), aW, aW, uni.upx2px(avatarW /
 					2))
 				//绘制标题
-				let titleSize = 19
+				let titleSize = 20
 				let titleParams = {
 					color: '#fff',
 					x: (hW / 2) - (this.title.length * titleSize / 2) - 10,
@@ -116,20 +115,19 @@
 				this.ctx.setFillStyle('#fff'); //设置标题文本颜色
 				this.ctx.fillText(this.subTitle, titleParams.x, subTitleParams.y)
 				//小程序码
-				// let qrSize = uni.upx2px(150)
-				let qrSize = uni.upx2px(200)
-				let qrcodeImg = await this.getImageInfo(this.qrcode)
-				this.ctx.drawImage(qrcodeImg.path, hW / 2 + uni.upx2px(96), hH - uni.upx2px(396), qrSize, qrSize)
+				// let qrSize = uni.upx2px(200)
+				// let qrcodeImg = await this.getImageInfo(this.qrcode)
+				// this.ctx.drawImage(qrcodeImg.path, hW / 2 + uni.upx2px(96), hH - uni.upx2px(396), qrSize, qrSize)
 				//绘制描述
-				let descSize = 14
-				let descParams = {
-					color: '#fff',
-					x: hW / 2 + uni.upx2px(70),
-					y: hH - uni.upx2px(358) + qrSize
-				}
-				this.ctx.setFontSize(descSize); //设置标题字体大小
-				this.ctx.setFillStyle('#fff'); //设置标题文本颜色
-				this.ctx.fillText(this.desc, descParams.x, descParams.y)
+				// let descSize = 14
+				// let descParams = {
+				// 	color: '#fff',
+				// 	x: hW / 2 + uni.upx2px(70),
+				// 	y: hH - uni.upx2px(358) + qrSize
+				// }
+				// this.ctx.setFontSize(descSize); //设置标题字体大小
+				// this.ctx.setFillStyle('#fff'); //设置标题文本颜色
+				// this.ctx.fillText(this.desc, descParams.x, descParams.y)
 				//渲染
 				this.ctx.draw(true, (res) => {
 					uni.hideLoading()
@@ -236,7 +234,7 @@
 						})
 						setTimeout(() => {
 							that.isShow = false
-						}, 2000)
+						}, 200)
 					}
 				})
 			}

+ 304 - 0
components/u-city-select.vue

@@ -0,0 +1,304 @@
+<template>
+	<view class="" :style="vuex_skin">
+		<u-popup v-model="value" mode="bottom" :popup="false" :mask="true" :closeable="true" :safe-area-inset-bottom="true"
+			close-icon-color="#ffffff" :z-index="uZIndex" :maskCloseAble="maskCloseAble" @close="close">
+			<u-tabs :active-color="vuex_theme.bgColor" v-if="value" :list="genTabsList" :is-scroll="true" :current="tabsIndex"
+				@change="tabsChange" ref="tabs"></u-tabs>
+			<view class="area-box">
+				<view class="u-flex" :class="{ 'change':isChange }">
+					<view class="area-item">
+						<view class="u-padding-10 u-bg-gray" style="height: 100%;">
+							<scroll-view :scroll-y="true" style="height: 100%">
+								<u-cell-group>
+									<u-cell-item v-for="(item,index) in provinces" :title="item.label" :arrow="false"
+										:index="index" :key="index" @click="provinceChange(item,index)">
+										<text v-if="isChooseP&&province==index" class="cuIcon-check text-bold text-base"></text>
+									</u-cell-item>
+								</u-cell-group>
+							</scroll-view>
+						</view>
+					</view>
+					<view class="area-item">
+						<view class="u-padding-10 u-bg-gray" style="height: 100%;">
+							<scroll-view :scroll-y="true" style="height: 100%">
+								<u-cell-group v-if="isChooseP">
+									<u-cell-item v-for="(item,index) in citys" :title="item.label" :arrow="false"
+										:index="index" :key="index" @click="cityChange(item,index)">
+										<text v-if="isChooseC&&city==index" class="cuIcon-check text-bold text-base"></text>
+									</u-cell-item>
+								</u-cell-group>
+							</scroll-view>
+						</view>
+					</view>
+		
+					<view class="area-item">
+						<view class="u-padding-10 u-bg-gray" style="height: 100%;">
+							<scroll-view :scroll-y="true" style="height: 100%">
+								<u-cell-group v-if="isChooseC">
+									<u-cell-item v-for="(item,index) in areas" :title="item.label" :arrow="false"
+										:index="index" :key="index" @click="areaChange(item,index)">
+										<text v-if="isChooseA&&area==index" class="cuIcon-check text-bold text-base"></text>
+									</u-cell-item>
+								</u-cell-group>
+							</scroll-view>
+						</view>
+					</view>
+				</view>
+			</view>
+		</u-popup>
+	</view>
+</template>
+
+<script>
+	/**
+	 * city-select 省市区级联选择器
+	 * @property {String Number} z-index 弹出时的z-index值(默认1075)
+	 * @property {Boolean} mask-close-able 是否允许通过点击遮罩关闭Picker(默认true)
+	 * @property {String} default-region 默认选中的地区,中文形式
+	 * @property {String} default-code 默认选中的地区,编号形式
+	 */
+	export default {
+		name: 'u-city-select',
+		props: {
+			// 通过双向绑定控制组件的弹出与收起
+			value: {
+				type: Boolean,
+				default: false
+			},
+			// 默认显示的地区,可传类似["河北省", "秦皇岛市", "北戴河区"]
+			defaultRegion: {
+				type: Array,
+				default () {
+					return [];
+				}
+			},
+			// 默认显示地区的编码,defaultRegion和areaCode同时存在,areaCode优先,可传类似["13", "1303", "130304"]
+			areaCode: {
+				type: Array,
+				default () {
+					return [];
+				}
+			},
+			// 是否允许通过点击遮罩关闭Picker
+			maskCloseAble: {
+				type: Boolean,
+				default: true
+			},
+			// 弹出的z-index值
+			zIndex: {
+				type: [String, Number],
+				default: 0
+			}
+		},
+		data() {
+			return {
+				cityValue: "",
+				isChooseP: false, //是否已经选择了省
+				province: 0, //省级下标
+				provinces: [],
+				isChooseC: false, //是否已经选择了市
+				city: 0, //市级下标
+				citys: [],
+				isChooseA: false, //是否已经选择了区
+				area: 0, //区级下标
+				areas: [],
+				tabsIndex: 0,
+
+				//接口city数据
+				cityList: [],
+			}
+		},
+		mounted() {
+			this.init();
+		},
+		computed: {
+			isChange() {
+				return this.tabsIndex > 1;
+			},
+			genTabsList() {
+				let tabsList = [{
+					name: "请选择"
+				}];
+				if (this.isChooseP) {
+					tabsList[0]['name'] = this.provinces[this.province]['label'];
+					tabsList[1] = {
+						name: "请选择"
+					};
+				}
+				if (this.isChooseC) {
+					tabsList[1]['name'] = this.citys[this.city]['label'];
+					tabsList[2] = {
+						name: "请选择"
+					};
+				}
+				if (this.isChooseA) {
+					tabsList[2]['name'] = this.areas[this.area]['label'];
+				}
+				return tabsList;
+			},
+			uZIndex() {
+				// 如果用户有传递z-index值,优先使用
+				return this.zIndex ? this.zIndex : this.$u.zIndex.popup;
+			}
+		},
+		methods: {
+			init() {
+				this.getProvince()
+				if (this.areaCode.length == 3) {
+					this.setProvince("", this.areaCode[0]);
+					this.setCity("", this.areaCode[1]);
+					this.setArea("", this.areaCode[2]);
+				} else if (this.defaultRegion.length == 3) {
+					this.setProvince(this.defaultRegion[0], "");
+					this.setCity(this.defaultRegion[1], "");
+					this.setArea(this.defaultRegion[2], "");
+				};
+			},
+			async getProvince() {
+				let provinces = (await this.$api.area.province()).data.data
+				this.provinces = []
+				provinces.forEach(item => {
+					let obj = {
+						hasChildren:item.hasChildren,
+						label: item.title,
+						value: item.value
+					}
+					this.provinces.push(obj)
+				})
+				this.getCity(this.provinces[0].value)
+			},
+			async getCity(code) {
+				let params = {
+					parentCode: code
+				}
+				let citys = (await this.$api.area.list(params)).data.data
+				this.citys = []
+				citys.forEach(item => {
+					let obj = {
+						hasChildren:item.hasChildren,
+						label: item.title,
+						value: item.value
+					}
+					this.citys.push(obj)
+				})
+				this.getArea(this.citys[0].value)
+			},
+			async getArea(code) {
+				let params = {
+					parentCode: code
+				}
+				let areas = (await this.$api.area.list(params)).data.data
+				this.areas = []
+				areas.forEach(item => {
+					let obj = {
+						hasChildren:item.hasChildren,
+						label: item.title,
+						value: item.value
+					}
+					this.areas.push(obj)
+				})
+			},
+			setProvince(label = "", value = "") {
+				console.log(label);
+				this.provinces.map((v, k) => {
+					if (value ? v.value == value : v.label == label) {
+						this.provinceChange(v, k);
+					}
+				})
+			},
+			setCity(label = "", value = "") {
+				this.citys.map((v, k) => {
+					if (value ? v.value == value : v.label == label) {
+						this.cityChange(v, k);
+					}
+				})
+			},
+			setArea(label = "", value = "") {
+				this.areas.map((v, k) => {
+					if (value ? v.value == value : v.label == label) {
+						this.isChooseA = true;
+						this.area = k;
+					}
+				})
+			},
+			close() {
+				this.$emit('input', false);
+			},
+			tabsChange(index) {
+				this.tabsIndex = index;
+			},
+			async provinceChange(item, index) {
+				if (!item.hasChildren) {
+					let result={
+						location:item.label,
+						locationCode:item.value+'0000'
+					}
+					this.$emit('city-change', result);
+					this.close();
+					return
+				}
+				this.isChooseP = true;
+				this.isChooseC = false;
+				this.isChooseA = false;
+				this.province = index;
+				this.getCity(item.value)
+				this.tabsIndex = 1;
+				
+			},
+			cityChange(item, index) {
+				if (!item.hasChildren) {
+					let result={
+						location:item.label,
+						locationCode:item.value+'00'
+					}
+					this.$emit('city-change', result);
+					this.close();
+					return
+				}
+				this.isChooseC = true;
+				this.isChooseA = false;
+				this.city = index;
+				this.getArea(item.value)
+				this.tabsIndex = 2;
+			},
+			areaChange(item, index) {
+				this.isChooseA = true;
+				this.area = index;
+				let result = {};
+				result.province = this.provinces[this.province];
+				result.city = this.citys[this.city];
+				result.area = this.areas[this.area];
+				let data={
+					location:result.province.label+'-'+result.city.label+'-'+result.area.label,
+					locationCode:result.province.value+'0000,'+result.city.value+'00,'+result.area.value,
+				}
+				console.log(data);
+				this.$emit('city-change', data);
+				this.close();
+			}
+		}
+
+	}
+</script>
+<style lang="scss">
+	.area-box {
+		width: 100%;
+		overflow: hidden;
+		height: 800rpx;
+
+		>view {
+			width: 150%;
+			transition: transform 0.3s ease-in-out 0s;
+			transform: translateX(0);
+
+			&.change {
+				transform: translateX(-33.3333333%);
+			}
+		}
+
+		.area-item {
+			width: 33.3333333%;
+			height: 800rpx;
+		}
+	}
+</style>

+ 86 - 75
manifest.json

@@ -1,77 +1,88 @@
 {
-    "name" : "activitys-uniapp",
-    "appid" : "__UNI__1804CA6",
-    "description" : "",
-    "versionName" : "1.0.0",
-    "versionCode" : "100",
-    "transformPx" : false,
-    /* 5+App特有相关 */
-    "app-plus" : {
-        "usingComponents" : true,
-        "nvueStyleCompiler" : "uni-app",
-        "compilerVersion" : 3,
-        "splashscreen" : {
-            "alwaysShowBeforeRender" : true,
-            "waiting" : true,
-            "autoclose" : true,
-            "delay" : 0
-        },
-        /* 模块配置 */
-        "modules" : {},
-        /* 应用发布信息 */
-        "distribute" : {
-            /* android打包配置 */
-            "android" : {
-                "permissions" : [
-                    "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
-                    "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
-                    "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
-                    "<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
-                    "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
-                    "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
-                    "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
-                    "<uses-permission android:name=\"android.permission.CAMERA\"/>",
-                    "<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
-                    "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
-                    "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
-                    "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
-                    "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
-                    "<uses-feature android:name=\"android.hardware.camera\"/>",
-                    "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
-                ]
-            },
-            /* ios打包配置 */
-            "ios" : {},
-            /* SDK配置 */
-            "sdkConfigs" : {}
-        }
-    },
-    /* 快应用特有相关 */
-    "quickapp" : {},
-    /* 小程序特有相关 */
-    "mp-weixin" : {
-        "appid" : "wx432ac69188f554a9",
-        "setting" : {
-            "urlCheck" : false
-        },
-        "usingComponents" : true
-    },
-    "mp-alipay" : {
-        "usingComponents" : true
-    },
-    "mp-baidu" : {
-        "usingComponents" : true
-    },
-    "mp-toutiao" : {
-        "usingComponents" : true
-    },
-    "uniStatistics" : {
-        "enable" : false
-    },
-    "vueVersion" : "2",
-    "h5" : {
-        "router" : {
-            "base" : "/h5/"
-        }
-    }
+	"name": "activitys-uniapp",
+	"appid": "__UNI__1804CA6",
+	"description": "",
+	"versionName": "1.0.0",
+	"versionCode": "100",
+	"transformPx": false,
+	/* 5+App特有相关 */
+	"app-plus": {
+		"usingComponents": true,
+		"nvueStyleCompiler": "uni-app",
+		"compilerVersion": 3,
+		"splashscreen": {
+			"alwaysShowBeforeRender": true,
+			"waiting": true,
+			"autoclose": true,
+			"delay": 0
+		},
+		/* 模块配置 */
+		"modules": {},
+		/* 应用发布信息 */
+		"distribute": {
+			/* android打包配置 */
+			"android": {
+				"permissions": [
+					"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
+					"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
+					"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
+					"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
+					"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
+					"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
+					"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
+					"<uses-permission android:name=\"android.permission.CAMERA\"/>",
+					"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
+					"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
+					"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
+					"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
+					"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
+					"<uses-feature android:name=\"android.hardware.camera\"/>",
+					"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
+				]
+			},
+			/* ios打包配置 */
+			"ios": {},
+			/* SDK配置 */
+			"sdkConfigs": {}
+		}
+	},
+	/* 快应用特有相关 */
+	"quickapp": {},
+	/* 小程序特有相关 */
+	"mp-weixin": {
+		"appid": "wx432ac69188f554a9",
+		"setting": {
+			"urlCheck": false
+		},
+		"usingComponents": true,
+		"permission": {
+			"scope.userLocation": {
+				"desc": "方便填写您的收货地址"
+			}
+		},
+		"plugins": {
+			"wt-logistics": {
+				"version": "1.2.0",
+				"provider": "wxeca4341756496160"
+			}
+		}
+	},
+	"mp-alipay": {
+		"usingComponents": true
+	},
+	"mp-baidu": {
+		"usingComponents": true
+	},
+	"mp-toutiao": {
+		"usingComponents": true
+	},
+	"uniStatistics": {
+		"enable": false
+	},
+	"vueVersion": "2",
+	"h5": {
+		"router": {
+			"base": "/h5/"
+		}
+	}
 }

+ 56 - 25
pages.json

@@ -34,7 +34,7 @@
 		}, {
 			"path": "pages/shop/shop",
 			"style": {
-				"navigationBarTitleText": "积分商城",
+				"navigationBarTitleText": "积分换礼",
 				"enablePullDownRefresh": false,
 				"navigationStyle": "custom"
 			}
@@ -142,39 +142,70 @@
 				"enablePullDownRefresh": false
 			}
 
+		}, {
+			"path": "pages/introduce/notice",
+			"style": {
+				"navigationBarTitleText": "投票须知",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/endorsement/endorsement",
+			"style": {
+				"navigationBarTitleText": "我要代言",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/rule/rule",
+			"style": {
+				"navigationBarTitleText": "活动规则",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/rule/point",
+			"style": {
+				"navigationBarTitleText": "积分兑换规则",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/address/address",
+			"style": {
+				"navigationBarTitleText": "用户地址",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/address/add",
+			"style": {
+				"navigationBarTitleText": "添加地址",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/mine/order/order",
+			"style": {
+				"navigationBarTitleText": "我的兑换",
+				"enablePullDownRefresh": false
+			}
+
 		}
 	    ,{
-            "path" : "pages/introduce/notice",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "投票须知",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/endorsement/endorsement",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "我要代言",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/rule/rule",
+            "path" : "pages/mine/logistics/logistics",
             "style" :                                                                                    
             {
-                "navigationBarTitleText": "活动规则",
+                "navigationBarTitleText": "物流信息",
                 "enablePullDownRefresh": false
             }
             
         }
         ,{
-            "path" : "pages/rule/point",
+            "path" : "pages/mine/order/detail",
             "style" :                                                                                    
             {
-                "navigationBarTitleText": "积分规则",
+                "navigationBarTitleText": "订单详情",
                 "enablePullDownRefresh": false
             }
             
@@ -210,7 +241,7 @@
 	"globalStyle": {
 		"navigationBarTextStyle": "black",
 		"navigationBarTitleText": "uni-app",
-		"navigationBarBackgroundColor": "#F8F8F8",
-		"backgroundColor": "#F8F8F8"
+		"navigationBarBackgroundColor": "#FFFFFF",
+		"backgroundColor": "#FFFFFF"
 	}
 }

+ 83 - 61
pages/activity/activityDetail.vue

@@ -2,14 +2,14 @@
 	<view :style="vuex_skin">
 		<u-navbar :custom-back="customBack" :is-back="true" title="作品详情"></u-navbar>
 		<view class="" v-show="!loading">
-			<video class="works-video"  :poster="activity.imgUrl" :src="activity.videoUrl"></video>
+			<video class="works-video" @error="videoError" :poster="activity.imgUrl" :src="activity.videoUrl"></video>
 			<view style="padding: 20rpx 30rpx 50rpx 30rpx;background: white;">
 				<view class="title" style="border-bottom: 1rpx solid #EEEEEE ;">
 					<span class="bg-red work-no"> {{activity.productNo}}号</span>
 					<span class="work-title">{{activity.title}}</span>
 					<view class="work-info-box">
 						<image class="remen-icon" src="../../static/icon/remen.png"></image>
-						<span class="vote-count">{{activity.heatValue}}</span>
+						<span class="vote-count">{{activity.voteCount}}</span>
 						<span class="work-rank">排行榜第{{activity.rank}}名</span>
 					</view>
 				</view>
@@ -18,7 +18,7 @@
 				</view>
 			</view>
 
-			<view @click="showShare" class="bg-white padding-30 margin-top-30 flex" v-if="false">
+			<view @click="showShare" class="bg-white padding-30 margin-top-30 flex">
 				<view class="basis-xs">
 					<image style="width: 84rpx;height: 84rpx;" src="../../static/icon/ic_zhuanfa.png"></image>
 				</view>
@@ -43,10 +43,9 @@
 		<!-- 海报 -->
 		<poster ref="poster" :avatar="posetrParams.avatar" :title="posetrParams.title"
 			:subTitle="posetrParams.subTitle"></poster>
-		<uqrcode class="canvas-hide" ref="uqrcode"></uqrcode>
 		<share-popup ref="sharePopup" @confirm="shareConfirm"></share-popup>
 		<timeline-popup ref="timelinePopup"></timeline-popup>
-		<sms-alert ref="smsAlert"  @exchange="cmccVote"></sms-alert>
+		<sms-alert ref="smsAlert" @exchange="cmccVote"></sms-alert>
 		<vote-success ref="voteSuccess" @support="showShare"></vote-success>
 	</view>
 </template>
@@ -57,7 +56,6 @@
 	import timelinePopup from "@/components/alert/timelinePopup.vue"
 	import votePopup from '@/components/alert/votePopup.vue'
 	import poster from "@/components/poster/poster.vue"
-	import uqrcode from "@/components/uqrcode/uqrcode.vue"
 	import smsAlert from "@/components/alert/smsAlert.vue"
 	export default {
 		components: {
@@ -67,10 +65,12 @@
 			timelinePopup,
 			votePopup,
 			poster,
-			uqrcode
 		},
 		async onLoad(props) {
-			this.isCustomBack=props.isCustomBack || true
+			uni.showShareMenu({
+				menus:['shareAppMessage','shareTimeline']
+			})
+			this.isCustomBack = props.isCustomBack || true
 			this.$refs.loading.showLoading()
 			//作品id
 			this.id = props.id;
@@ -85,19 +85,20 @@
 			//隐藏loading
 			setTimeout(() => {
 				this.hideLoading()
-			}, 400)
+			}, 20)
 		},
 		computed: {
 			content() {
 				return decodeURIComponent(this.activity.content)
 			}
 		},
+
 		data() {
 			return {
 				//是否自定义返回,防止授权时返回到webview页面
-				isCustomBack:true,
+				isCustomBack: true,
 
-				defaultAvatar:'https://vote.guosen-fumao.cn/obsfile/446d9e043f3748e4a47ea4d0de81b140-3b748fea4150c469b8eb66f98cd29e2.png',
+				defaultAvatar: 'https://vote.guosen-fumao.cn/obsfile/446d9e043f3748e4a47ea4d0de81b140-3b748fea4150c469b8eb66f98cd29e2.png',
 
 				loading: false,
 				//作品id
@@ -109,8 +110,8 @@
 				//分享
 				qrCodeImg: '',
 				//选中的道具
-				selectGoods:{},
-				
+				selectGoods: {},
+				mpShare: {},
 				posetrParams: {
 					avatar: '',
 					title: '我是普法帮帮代言人',
@@ -128,8 +129,25 @@
 
 			}
 		},
+		onShareAppMessage(res) {
+			return {
+				title: this.mpShare.title,
+				path: this.mpShare.path,
+				imageUrl: this.mpShare.imageUrl
+			}
+		},
+		onShareTimeline(res) {
+			return {
+				title: this.mpShare.title,
+				path: this.mpShare.path,
+				imageUrl: this.mpShare.imageUrl
+			}
+		},
 		methods: {
-			hideLoading(){
+			videoError(e){
+				console.log(e,"error");
+			},
+			hideLoading() {
 				this.$refs.loading.hide()
 				this.loading = false
 			},
@@ -137,27 +155,36 @@
 				this.activity = (await this.$api.activity.getWorksDetail(this.id)).data.data
 			},
 			async handelShareParams() {
-				console.log(this.activity.productNo);
+				let title= await this.getPosetrParamsTitle()
 				this.posetrParams = {
 					avatar: this.defaultAvatar,
-					title: '我是普法帮帮代言人',
-					subTitle: '邀请您为'+this.activity.productNo+'号作品投票!'
+					title: title,
+					subTitle: '邀请您为' + this.activity.productNo + '号作品投票!'
 				}
 				let userId = this.vuex_userId || '000000' //游客
 				let sharePath = '/pages/activity/activityDetail?id=' + this.activity.id + '&userId=' + userId
 				let encodePath = encodeURIComponent(sharePath)
-				this.$u.mpShare = {
-					title: '我是普法帮帮代言人,' + this.posetrParams.subTitle,
+				this.mpShare = {
+					title: title +','+this.posetrParams.subTitle,
 					path: '/pages/index/home?path=' + encodePath,
 					imageUrl: this.activity.imgUrl
 				}
-
-				let qrText = this.$config.PRODUCT_PATH + '?path=' + encodePath
-				console.log(qrText);
-				this.qrCodeImg = (await this.$refs.uqrcode.make({
-					size: 150,
-					text: qrText
-				})).tempFilePath
+			},
+			async getPosetrParamsTitle(){
+				let title="我是普法帮帮代言人"
+				if (this.$isEmpty(this.vuex_phone)) {
+					return title
+				}
+				let params={
+					activeId:this.vuex_active_setting.defaultActiveId,
+					phone:this.vuex_phone
+				}
+				let res=await this.$api.activity.getPromoteNum(params)
+				let index=res.data.data.index
+				if (this.$isNotEmpty(index)) {
+					title=`我是第${index}位大赛代言人!`
+				}
+				return title
 			},
 			handelAuthResult(options) {
 				if (options.authResult == undefined) {
@@ -177,7 +204,7 @@
 				}
 			},
 			handelOrderResult(options) {
-				if (options.orderPass&&this.$cache.get('orderResult')) {
+				if (options.orderPass && this.$cache.get('orderResult')) {
 					this.orderResult = this.$cache.get('orderResult')
 					this.createOrder()
 				}
@@ -193,11 +220,11 @@
 			//去投票
 			toVote(item) {
 				if (this.$cache.get('orderResult')) {
-					this.orderResult=this.$cache.get('orderResult')
-					this.orderResult.goodsId=item.id
-					this.$cache.put('orderResult',this.orderResult,1*60*60)
+					this.orderResult = this.$cache.get('orderResult')
+					this.orderResult.goodsId = item.id
+					this.$cache.put('orderResult', this.orderResult, 1 * 60 * 60)
 				}
-				this.selectGoods=item
+				this.selectGoods = item
 				if (item.point == 0) {
 					//免费投票
 					this.freeVote()
@@ -217,6 +244,7 @@
 			},
 			//移动积分创建订单
 			async createOrder() {
+				console.log("123456");
 				if (this.$isEmpty(this.orderResult.fingerprint) ||
 					this.$isEmpty(this.orderResult.sessionId) ||
 					this.$isEmpty(this.orderResult.goodsId)) {
@@ -231,22 +259,21 @@
 					phone: this.vuex_phone,
 					userId: this.vuex_userId
 				}
-				let res=await this.$api.order.create(params)
+				let res = await this.$api.order.create(params)
 				if (res.data.success) {
-					this.orderResult.outOrderId=res.data.data
-					this.orderResult.mobile=this.vuex_phone
-					console.log(this.orderResult,"/***********");
+					this.orderResult.outOrderId = res.data.data
+					this.orderResult.mobile = this.vuex_phone
 					this.$refs.smsAlert.showSmsAndSend(this.orderResult)
-				}else{
+				} else {
 					this.$refs.toast.error(res.data.msg)
 				}
 			},
-			async cmccVote(item){
+			async cmccVote(item) {
 				this.$refs.smsAlert.hideSms()
 				let params = {
 					...item,
-					machinetype:'phone',
-					productId:this.id,
+					machinetype: 'phone',
+					productId: this.id,
 					helpGoodsId: this.orderResult.goodsId,
 					userId: this.vuex_userId,
 					num: 1,
@@ -255,17 +282,16 @@
 				if (res.data.success) {
 					this.voteSuccess()
 					this.$refs.smsAlert.hideSms()
-				}else{
+				} else {
 					this.$refs.toast.error(res.data.msg)
 				}
 			},
-			voteSuccess(){
-				try{
-					let avatar=this.$cache.get('userInfo').avatar || this.defaultAvatar
-					let voteCount=this.selectGoods.votePointRate
-					let pointNum=this.vuex_active_setting.voteAndPointRate
-					this.$refs.voteSuccess.showSuccess(avatar,voteCount,pointNum)
-				}catch(e){
+			voteSuccess() {
+				try {
+					let avatar = this.$cache.get('userInfo').avatar || this.defaultAvatar
+					let activeVote = this.selectGoods.activeVote
+					this.$refs.voteSuccess.showSuccess(avatar, activeVote)
+				} catch (e) {
 					this.$refs.toast.info('助力成功')
 				}
 			},
@@ -281,9 +307,9 @@
 					this.$refs.votePopup.hideVote()
 					this.fetchData()
 
-					let avatar=this.$cache.get('userInfo').avatar
-					let voteCount=this.selectGoods.votePointRate
-					let pointNum=this.vuex_active_setting.voteAndPointRate
+					let avatar = this.$cache.get('userInfo').avatar
+					let voteCount = this.selectGoods.votePointRate
+					let pointNum = this.vuex_active_setting.voteAndPointRate
 					setTimeout(() => {
 						this.voteSuccess()
 					}, 200)
@@ -295,27 +321,22 @@
 				}
 			},
 			customBack() {
-				if (this.isCustomBack==true) {
+				if (this.isCustomBack == true) {
 					uni.switchTab({
 						url: '/pages/index/home'
 					})
-				}else{
+				} else {
 					uni.navigateBack({
-						delta:1
+						delta: 1
 					})
 				}
 			},
 			//分享
-			async showPoster() {
-				this.$refs.poster.showCanvas(this.qrCodeImg)
+			showPoster() {
+				this.$refs.poster.showCanvas()
 			},
 			async shareConfirm(item) {
 				if (item.name == '海报') {
-					let params={
-						activeId:this.activity.activeId,
-						userId:this.vuex_userId
-					}
-					this.promoteNum= (await this.$api.activity.getPromoteNum(params)).data.data
 					this.showPoster()
 					return
 				}
@@ -326,7 +347,8 @@
 					this.$refs.timelinePopup.show()
 				}
 			},
-			showShare() {
+			async showShare() {
+				await this.handelShareParams()
 				this.$refs.sharePopup.show()
 			}
 		},

+ 328 - 0
pages/address/add.vue

@@ -0,0 +1,328 @@
+<!-- 添加修改地址 -->
+<template>
+	<view class="address-wrap" :style="vuex_skin">
+		<u-form :model="model" :rules="rules" ref="uForm" :errorType="errorType">
+			<!-- 地址定位 -->
+			<view class="location-item u-flex u-row-between u-p-20 u-m-b-20" @tap="chooseLocation">
+				<view class="u-flex">
+					<u-icon name="map-fill" :color="vuex_theme.bgColor"></u-icon>
+					<text class="text-base">{{ chooseAddress }}</text>
+				</view>
+				<text class="u-iconfont uicon-arrow-right" style="color: #666"></text>
+			</view>
+
+			<view class="address-box">
+				<!-- 地址表单 -->
+				<u-form-item :labelStyle="labelStyle"   label-width="150" label-position="left" label="收货人:"
+					prop="consignee">
+					<u-input placeholder="请填写收货人姓名" v-model="model.consignee" type="text"></u-input>
+				</u-form-item>
+				<u-form-item :labelStyle="labelStyle"   label-width="150" label-position="left" label="手机号:"
+					prop="phone">
+					<u-input placeholder="请输入收货人手机号" v-model="model.phone" type="number"></u-input>
+				</u-form-item>
+				<u-form-item :labelStyle="labelStyle" label-width="150" label-position="left" label="所在地区:"
+					prop="area_text">
+					<u-input type="select" v-model="model.area_text" :select-open="showSelect" placeholder="请选择地区"
+						@click="showSelect = true"></u-input>
+				</u-form-item>
+				<u-form-item :labelStyle="labelStyle" label-position="top" label-width="150" label="详细地址:"
+					prop="address">
+					<u-input border borderColor="#eee" height="150" type="textarea" v-model="model.address"
+						placeholder="如道路、门牌号、小区、楼栋号、单元室等" />
+				</u-form-item>
+			</view>
+
+			<!-- 设置默认 -->
+			<view class="default-box u-flex u-row-between">
+				<text class="title">设为默认地址</text>
+				<u-switch v-model="model.isDefault" :activeColor="vuex_theme.bgColor" size="40"></u-switch>
+			</view>
+
+		</u-form>
+
+		<block v-if="!showSelect">
+			<view class="" style="height: 90rpx;"></view>
+			<view :style="{paddingBottom:safeAreaBottom}" class="footer-fixed center" style="bottom: 10%;">
+				<view @click="submit" class="cu-btn df bg-base  round " style="width: 90%;height: 80rpx;">
+					<text>保存收货地址</text>
+				</view>
+			</view>
+		</block>
+
+		<!-- 省市区选择器 -->
+		<toast ref="toast"></toast>
+		<city-select v-model="showSelect" @city-change="getRegion"></city-select>
+	</view>
+</template>
+
+<script>
+	import citySelect from '@/components/u-city-select.vue';
+	export default {
+		components: {
+			citySelect
+		},
+		data() {
+			return {
+				showSelect: false, //省市区
+				addressAreaList: [],
+				addressId: 0, //收货地址ID
+				labelStyle: {
+					'font-size': '28rpx',
+					'font-weight': '600',
+					color: '#595959'
+				},
+				model: {
+					id: '',
+					userId: '',
+					consignee: '',
+					phone: '',
+					area_text: '',
+					address: '',
+					isDefault: false,
+					latitude: '',
+					longitude: ''
+				},
+				rules: {
+					phone: [{
+							required: true,
+							message: '请输入收货人手机号',
+							trigger: ['change', 'blur']
+						},
+						{
+							validator: (rule, value, callback) => {
+								return this.$u.test.mobile(value);
+							},
+							message: '手机号码不正确',
+							trigger: ['change', 'blur']
+						}
+					],
+					consignee: [{
+						required: true,
+						message: '请填写收货人姓名',
+						trigger: ['change', 'blur']
+					}],
+					area_text: [{
+						required: true,
+						message: '请选择地区',
+						trigger: ['change', 'blur']
+					}],
+					address: [{
+						required: true,
+						message: '请输入详细地址',
+						trigger: ['change', 'blur']
+					}]
+				},
+				errorType: ['message'],
+				chooseAddress: '点击选择地理位置'
+			};
+		},
+		computed: {},
+		onReady() {
+			this.$refs.uForm.setRules(this.rules);
+		},
+		onLoad(options) {
+			this.addressId = options.addressId
+			this.model.phone = this.vuex_phone
+			this.model.userId = this.vuex_userId
+			uni.setNavigationBarTitle({
+				title: this.addressId ? '编辑收货地址' : '添加收货地址'
+			});
+
+			if (this.$isNotEmpty(this.addressId)) {
+				//编辑
+				this.fetchAddress()
+				return
+			}
+			console.log("1111");
+			//新增
+			if (options.wxAddress) {
+				// 微信导入
+				this.wxAddressInit(options)
+			} else {
+				//定位获取
+				this.getLocation()
+			}
+		},
+		methods: {
+			fetchAddress() {
+				this.$api.address.detail({
+					id: this.addressId
+				}).then(res => {
+					let data=res.data.data
+					if (this.$isNotEmpty(data)) {
+						this.chooseAddress = data.address
+						this.model = data
+						this.model.area_text = data.provinceName + '-' + data.cityName + '-' + data
+							.areaName
+					}
+				})
+			},
+			async analyseLocation(data, type = 0) {
+				let params = {
+					longitude: data.longitude,
+					latitude: data.latitude
+				}
+				let res = await this.$api.address.getLocation(params)
+				let result = res.data.data.result
+				this.model.area_text = result.address_component.province + '-' +
+					result.address_component.city + '-' +
+					result.address_component.district
+				if (type == 1) {
+					this.chooseAddress = result.formatted_addresses.recommend
+					this.model.address = result.formatted_addresses.recommend
+				} else {
+					this.chooseAddress = data.name
+					this.model.address = data.name
+				}
+			},
+			async chooseLocation() {
+				let res = await this.$mpi.chooseLocation()
+				if (res.errMsg != 'chooseLocation:ok') {
+					this.$refs.toast.error('选择地址失败')
+					return
+				}
+				this.analyseLocation(res)
+			},
+			async getLocation() {
+				let res = await this.$mpi.getLocation()
+				if (res.errMsg != 'getLocation:ok') {
+					return
+				}
+				this.analyseLocation(res, 1)
+			},
+			getRegion(data) {
+				this.model.area_text = data.location
+			},
+			// 微信导入数据格式
+			wxAddressInit(options) {
+				let wxAddress = JSON.parse(options.wxAddress); //微信导入
+				console.log(wxAddress);
+				this.model.consignee = wxAddress.userName;
+				this.model.phone = wxAddress.telNumber;
+				this.model.area_text = `${wxAddress.provinceName}-${wxAddress.cityName}-${wxAddress.countyName}`;
+				this.model.address = wxAddress.detailInfo.replace(/%20/g, '');
+				this.model.isDefault = false;
+
+				this.chooseAddress = this.model.address
+			},
+
+			// 提交
+			submit() {
+				this.$refs.uForm.validate(valid => {
+					valid ? this.editAddress() : console.log('验证失败');
+				});
+			},
+			// 编辑添加地址
+			editAddress() {
+				let that = this;
+				let area = this.model.area_text.split("-")
+				let data = this.$u.deepClone(this.model)
+				data.provinceName = area[0]
+				data.cityName = area[1]
+				data.areaName = area[2]
+				this.$api.address.submit(data).then(res => {
+					if (res.data.success) {
+						this.$dialog.showModalAndBack('操作成功',this.vuex_theme.bgColor)
+					}
+				})
+			},
+
+		}
+	};
+</script>
+
+<style lang="scss">
+	// 点击定位
+	.location-item {
+		font-size: 28rpx;
+		font-weight: 500;
+		background-color: #fff;
+		color: rgba(167, 111, 13, 1);
+	}
+
+	// 表单
+	.address-box {
+		background-color: #fff;
+		padding: 0 30rpx;
+	}
+
+	.address-item {
+		height: 96rpx;
+		background: #fff;
+		border-bottom: 1rpx solid rgba(#dfdfdf, 0.5);
+		padding: 0 25rpx;
+
+		.item-title {
+			color: #333;
+			font-size: 28rpx;
+			white-space: nowrap;
+		}
+
+		.inp {
+			color: #333;
+			font-size: 28rpx;
+		}
+	}
+
+	.area-box {
+		min-height: 120rpx;
+		padding-bottom: 60rpx;
+		background: #fff;
+		padding: 30rpx 25rpx;
+
+		.item-title {
+			font-size: 28rpx;
+			line-height: 28rpx;
+			vertical-align: middle;
+			white-space: nowrap;
+		}
+
+		.area-inp {
+			color: #333;
+			font-size: 28rpx;
+			vertical-align: middle;
+			margin-top: 8rpx;
+			width: 550rpx;
+		}
+	}
+
+	.default-box {
+		height: 100rpx;
+		padding: 0 25rpx;
+		background: #fff;
+		margin-top: 20rpx;
+
+		.title {
+			font-size: 28rpx;
+		}
+
+		.switch {
+			transform: scale(0.8);
+		}
+	}
+
+	// 底部按钮
+	.foot_box {
+		.delete-btn {
+			line-height: 70rpx;
+			background: linear-gradient(93deg, rgba(208, 19, 37, 1), rgba(237, 60, 48, 1));
+			box-shadow: 0px 7rpx 6rpx 0px rgba(#ed3c30, 0.22);
+			font-size: 28rpx;
+
+			font-weight: 500;
+			color: rgba(255, 255, 255, 1);
+			border-radius: 35rpx;
+			padding: 0;
+			margin-right: 20rpx;
+		}
+
+		.save-btn {
+			line-height: 70rpx;
+			background: linear-gradient(90deg, rgba(233, 180, 97, 1), rgba(238, 204, 137, 1));
+			border: 1rpx solid rgba(238, 238, 238, 1);
+			border-radius: 40rpx;
+			color: rgba(#fff, 0.9);
+		}
+	}
+</style>

+ 188 - 0
pages/address/address.vue

@@ -0,0 +1,188 @@
+<!-- 地址列表 -->
+<template>
+	<view class="address-wrap" :style="vuex_skin">
+		<view v-if="addressList" class="address-list" v-for="address in addressList" :key="address.id"
+			@tap="useAddress(address)">
+			<view class="top u-flex">
+				<text class="name">{{ address.consignee }}</text>
+				<text class="phone ">{{ address.phone }}</text>
+				<text class="tag" v-if="address.isDefault">默认</text>
+			</view>
+			<view class="detail">
+				{{ address.provinceName }}{{ address.cityName }}{{ address.areaName }}{{ address.address }}</view>
+			<button class="u-reset-button set-btn" @tap.stop="edit(address.id)">编辑</button>
+		</view>
+
+		<view class="empty" v-else>
+			<image src="@/static/icon/empty.png" mode="widthFix"></image>
+			<text>暂无地址</text>
+		</view>
+
+		<view class="foot_box-wrap safe-area-inset-bottom">
+			<view class="foot_box u-flex u-row-between safe-area-inset-bottom">
+				<!-- 微信小程序和微信H5 -->
+				<button class="u-reset-button sync-wxaddress u-m-20 u-flex u-row-center u-col-center"
+					@tap="getWXaddress">
+					<text class="u-iconfont uicon-weixin-fill u-p-r-10" style="color:#09bb07;font-size: 40rpx;"></text>
+					导入微信地址
+				</button>
+				<button class="u-reset-button add-btn u-m-20"
+					@tap="$jump('/pages/address/add')">添加新的收货地址</button>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	let _this;
+	export default {
+		components: {},
+		data() {
+			return {
+				addressList: [],
+			};
+		},
+		computed: {},
+		onLoad() {
+			_this = this
+		},
+		onShow() {
+			this.getAddressList();
+		},
+		methods: {
+			// 选中
+			useAddress(addressData) {
+				let params = {
+					addressData
+				}
+				this.$util.backWithParams(params)
+
+				uni.$emit('ADDRESS', addressData)
+			},
+			//编辑
+			edit(id) {
+				uni.navigateTo({
+					url: "./add?addressId=" + id
+				})
+			},
+			// 微信导入
+			getWXaddress() {
+				uni.chooseAddress({
+					success: res => {
+						_this.$jump('/pages/address/add?wxAddress=' + JSON.stringify(res))
+					},
+					fail: err => {
+						console.log('%cuni.chooseAddress,调用失败', 'color:green;background:yellow');
+					}
+				});
+			},
+			getAddressList() {
+				let params = {
+					userId: this.vuex_userId
+				}
+				this.$api.address.list(params).then(res => {
+					this.addressList = res.data.data.records
+				})
+			}
+		}
+	};
+</script>
+
+<style lang="scss">
+	.empty {
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		margin-top: 360rpx;
+		flex-direction: column;
+
+		image {
+			width: 220rpx;
+			height: 170rpx;
+		}
+
+		text {
+			margin-top: 20rpx;
+			font-size: 28rpx;
+			color: #c1c1c1;
+		}
+	}
+
+	.address-list {
+		padding: 40rpx;
+		position: relative;
+		background: #fff;
+		margin-bottom: 20rpx;
+
+		.name {
+			font-size: 30rpx;
+			font-weight: 600;
+			margin-bottom: 10rpx;
+		}
+
+		.phone {
+			font-size: 30rpx;
+			margin: 0 20rpx;
+		}
+
+		.tag {
+			background: rgba(233, 191, 113, 0.2);
+			border-radius: 6rpx;
+			padding: 0 16rpx;
+			line-height: 38rpx;
+			color: var(--bgColor);
+			font-size: 22rpx;
+		}
+
+		.detail {
+			margin-top: 25rpx;
+			width: 543rpx;
+			font-size: 26rpx;
+
+			font-weight: 400;
+			color: rgba(153, 153, 153, 1);
+			line-height: 40rpx;
+		}
+
+		.set-btn {
+			background: none;
+			position: absolute;
+			font-size: 26rpx;
+			color: var(--bgColor);
+			top: 40rpx;
+			right: 40rpx;
+		}
+	}
+
+	// 底部按钮
+	.foot_box-wrap {
+		height: 140rpx;
+		width: 100%;
+	}
+
+	.foot_box {
+		padding: 10rpx 20rpx;
+		position: fixed;
+		bottom: 0;
+		left: 0;
+		width: 100%;
+		background-color: #fff;
+		border-top: 1rpx solid rgba(#ccc, 0.2);
+
+		.sync-wxaddress {
+			flex: 1;
+			line-height: 80rpx;
+			background: rgba(255, 255, 255, 1);
+			border-radius: 40rpx;
+			box-shadow: 0 0 1rpx 6rpx rgba(#ccc, 0.2);
+		}
+
+		.add-btn {
+			line-height: 80rpx;
+			flex: 1;
+			background: var(--bgColor);
+			color:  rgba(255, 255, 255, 1);
+			border-radius: 40rpx;
+		}
+	}
+</style>

+ 1 - 11
pages/endorsement/endorsement.vue

@@ -1,7 +1,6 @@
 <template>
 	<view class="u-content">
-		<u-parse :html="content" v-show="!loading"></u-parse>
-		<loading ref="loading" type="3"/>
+		<u-parse :html="content" ></u-parse>
 	</view>
 </template>
 
@@ -9,12 +8,10 @@
 	export default {
 		data() {
 			return {
-				loading:true,
 				content: ''
 			}
 		},
 		onLoad() {
-			this.$refs.loading.showLoading()
 			this.fetchDetail()
 		},
 		methods:{
@@ -24,15 +21,8 @@
 				}
 				this.$api.notice.detail(params).then(res=>{
 					this.content=res.data.data.content
-					this.hideLoading()
 				})
 			},
-			hideLoading(){
-				setTimeout(()=>{
-					this.$refs.loading.hide()
-					this.loading=false
-				},300)
-			}
 		}
 	}
 </script>

+ 12 - 7
pages/index/home.vue

@@ -3,7 +3,7 @@
 		<mescroll-body ref="mescrollRef" @init="mescrollInit" :down="downOption" :up="upOption" @down="downCallback"
 			@up="upCallback">
 			<view style="padding: 30rpx 30rpx 10rpx;">
-				<u-swiper :list="swiperList" border-radius="12" name="url" height="300"></u-swiper>
+				<u-swiper :list="swiperList" border-radius="12" name="url" mode="rect" height="300"></u-swiper>
 			</view>
 			<view class="">
 				<view class="cu-list grid col-3 no-border"  style="border-radius:20rpx ;">
@@ -30,15 +30,15 @@
 				<view @click="$jump('/pages/activity/activityDetail?id='+item.id)" class="card shadow"
 					v-for="(item,index) in worksList" :key="item.id">
 					<view v-if="index==0" class="center bg-img rank-tag"
-						style="background-image: url(../../static/icon/ph1.png);z-index: 2;">
+						style="background-image: url(/static/icon/ph1.png);z-index: 2;">
 						<text>1</text>
 					</view>
 					<view v-if="index==1" class="center bg-img rank-tag"
-						style="background-image: url(../../static/icon/ph2.png);z-index: 2;">
+						style="background-image: url(/static/icon/ph2.png);z-index: 2;">
 						<text>2</text>
 					</view>
 					<view v-if="index==2" class="center bg-img rank-tag"
-						style="background-image: url(../../static/icon/ph3.png);z-index: 2;">
+						style="background-image: url(/static/icon/ph3.png);z-index: 2;">
 						<text>3</text>
 					</view>
 					<view class="left">
@@ -63,11 +63,10 @@
 								<image class="center" style="width: 30rpx;height: 30rpx;"
 									src="../../static/icon/remen.png">
 								</image>
-								<text
-									style="color: #353535;margin-left: 6rpx;font-size:28rpx;">{{item.heatValue}}</text>
+								<text style="color: #353535;margin-left: 6rpx;font-size:28rpx;">{{item.voteCount}}</text>
 							</view>
 							<view class="cu-btn round sm line-base">
-								去助力
+								去投票
 							</view>
 						</view>
 					</view>
@@ -139,6 +138,12 @@
 		onLoad(options) {
 			this.handelRoute(options)
 		},
+		onShow() {
+			if (this.canReset) {
+				this.mescroll.resetUpScroll();
+			}
+			this.canReset=true
+		},
 		methods: {
 			/**
 			 * 处理路由转发

+ 11 - 21
pages/introduce/notice.vue

@@ -1,7 +1,6 @@
 <template>
 	<view class="u-content">
-		<u-parse :html="content" v-show="!loading"></u-parse>
-		<loading ref="loading" type="3"/>
+		<u-parse :html="content" ></u-parse>
 	</view>
 </template>
 
@@ -9,42 +8,33 @@
 	export default {
 		data() {
 			return {
-				loading:true,
 				content: ''
 			}
 		},
 		onLoad() {
-			this.$refs.loading.showLoading()
 			this.fetchDetail()
 		},
-		methods:{
-			fetchDetail(){
-				let params={
-					title:'投票须知'
+		methods: {
+			fetchDetail() {
+				let params = {
+					title: '投票须知'
 				}
-				this.$api.notice.detail(params).then(res=>{
-					this.content=res.data.data.content
-					this.hideLoading()
+				this.$api.notice.detail(params).then(res => {
+					this.content = res.data.data.content
 				})
 			},
-			hideLoading(){
-				setTimeout(()=>{
-					this.$refs.loading.hide()
-					this.loading=false
-				},300)
-			}
 		}
 	}
 </script>
 
-<style >
-	page{
+<style>
+	page {
 		background-color: #FFFFFF;
 	}
-	
+
 	.u-content {
 		padding: 30rpx;
 		line-height: 50rpx;
 		color: #505050;
 	}
-</style>
+</style>

+ 1 - 1
pages/mine/info/info.vue

@@ -30,7 +30,7 @@
 			<view class="flex padding justify-between align-center">
 				<view class="title">手机号<text class="text-red">*</text></view>
 				<view class="center">
-					<u-input :disabled="!isEdit" v-model="userData.phone" :placeholder-style="placeholderStyle" :clearable="false"
+					<u-input disabled v-model="userData.phone" :placeholder-style="placeholderStyle" :clearable="false"
 						inputAlign="right" placeholder="请填写手机号码"></u-input>
 					<text class="cuIcon-right margin-left-10" style="color: #CCCCCC;"></text>
 				</view>

Dosya farkı çok büyük olduğundan ihmal edildi
+ 195 - 0
pages/mine/logistics/logistics.vue


+ 35 - 17
pages/mine/mine.vue

@@ -8,12 +8,12 @@
 					</view>
 					<view class="flex align-center padding-top-sm">
 						<view>
-							<view class="text-black text-bold center">{{userData.heatValue || 0}}</view>
-							<view class="text-gray text-sm margin-top-10">热力</view>
+							<view class="text-black text-bold center">{{userHeatAndPoint.userVoteCount || 0}}</view>
+							<view class="text-gray text-sm margin-top-10">票数</view>
 						</view>
 						<view style="height: 60upx;border: #D2D2D2 1px solid; margin: 0 30upx;"></view>
 						<view>
-							<view class="text-black text-bold center">{{userData.pufaPoint || 0}}</view>
+							<view class="text-black text-bold center">{{userHeatAndPoint.userPufaPoint || 0}}</view>
 							<view class="text-gray text-sm margin-top-10">积分</view>
 						</view>
 						<view class="padding-left">
@@ -62,7 +62,7 @@
 			</view>
 		</view>
 		<view class="container">
-			<view v-for="(item, index) in iconList" :key="index" @click="jump(item.url,item.auth)">
+			<button :open-type="item.name=='联系我们'?'contact':''" class="u-reset-button" v-for="(item, index) in iconList" :key="index" @click="jump(item.url,item.auth)">
 				<block v-if="item.name == '分割线'">
 					<view style="padding: 10rpx 20rpx;">
 						<u-line></u-line>
@@ -84,7 +84,7 @@
 						</view>
 					</view>
 				</block>
-			</view>
+			</button>
 		</view>
 		<toast ref="toast" ></toast>
 		<login ref="login" @signIn="signIn" @phoneSuccess="phoneSuccess"></login>
@@ -97,12 +97,13 @@
 			return {
 				userId: '',
 				userData: {},
+				userHeatAndPoint:{},
 				//更换主题
 				themeChecked: true,
 				iconList: [{
 						name: '我的兑换',
 						icon: '/static/mine/duihuan.png',
-						url: '',
+						url: '/pages/mine/order/order',
 						auth: true //是否登录验证
 					},
 					{
@@ -130,11 +131,17 @@
 						auth: false //是否登录验证
 					},
 					{
-						name: '活动规则',
+						name: '积分兑换规则',
 						icon: '/static/mine/guize.png',
-						url: '/pages/rule/rule',
+						url: '/pages/rule/point',
 						auth: false
 					},
+					{
+						name: '联系我们',
+						icon: '/static/mine/kefu.png',
+						url: 'kefu',
+						auth: false //是否登录验证
+					},
 					// {
 					// 	name: '更换主题',
 					// 	icon: '/static/mine/theme.png',
@@ -150,6 +157,7 @@
 		methods: {
 			init() {
 				this.fetchUserInfo()
+				this.fetchHeatValueAndPoint()
 			},
 			jump(url, auth) {
 				if (url=='more') {
@@ -174,18 +182,28 @@
 					url
 				})
 			},
-			fetchUserInfo() {
+			async fetchUserInfo() {
 				let params = {
 					id: this.vuex_userId
 				}
-				this.$api.loginUser.detail(params).then(res => {
-					if (this.$isNotEmpty(res.data.data)) {
-						this.userData = res.data.data
-						let userInfo = this.userData
-						userInfo.sessionKey = this.$cache.get('userInfo').sessionKey
-						this.$cache.put('userInfo', userInfo)
-						this.$u.vuex('vuex_phone', this.userData.phone)
-					}
+				let res=await this.$api.loginUser.detail(params)
+				if (this.$isNotEmpty(res.data.data)) {
+					this.userData = res.data.data
+					let userInfo = this.userData
+					userInfo.sessionKey = this.$cache.get('userInfo').sessionKey
+					this.$cache.put('userInfo', userInfo)
+					this.$u.vuex('vuex_phone', this.userData.phone)
+				}
+			},
+			fetchHeatValueAndPoint() {
+				if (!this.vuex_phone) {
+					return
+				}
+				let params = {
+					phone: this.vuex_phone
+				}
+				this.$api.loginUser.userHeatValueAndPufaPoint(params).then(res => {
+					this.userHeatAndPoint=res.data.data
 				})
 			},
 			themeChange() {

+ 37 - 32
pages/mine/my-help/help-records.vue

@@ -1,37 +1,38 @@
 <template>
 	<view>
-		<mescroll-body-diy ref="mescrollRef" @init="mescrollInit" :down="downOption" @down="downCallback"
-			@up="upCallback">
+		<mescroll-body ref="mescrollRef" @init="mescrollInit" :down="downOption" @down="downCallback" @up="upCallback">
 			<view @click="jump(item)" class="card" v-for="(item,index) in list" :key="index">
-				<view class="card-top">
-					<view>
+				<view class="card-left">
+					<view class="title">
 						<text v-if="item.heatType=='HEAT_VALUE_EXCHANGE'">热力值兑换</text>
 						<text v-if="item.heatType=='HEAT_VALUE_SEND'">热力值赠送</text>
 					</view>
-					<view class="flex">
-						<image src="/static/icon/remen.png" style="width: 36rpx;height: 36rpx;margin-right: 6rpx;">
-						</image>
-						<text v-if="item.heatType=='HEAT_VALUE_EXCHANGE'" class="center reduce">{{heatValue}}</text>
-						<text v-if="item.heatType=='HEAT_VALUE_SEND'" class="center plus">{{heatValue}}</text>
+
+					<view class="time">
+						<text>{{item.createTime}}</text>
 					</view>
 				</view>
 
-				<view class="card-bottom">
-					<view class="center">{{item.createTime}}</view>
+				<view class="card-right">
+					<view class="center">
+						<image src="/static/icon/remen.png" style="width: 36rpx;height: 36rpx;margin-right: 6rpx;">
+						</image>
+					</view>
+					<view class="center padding-top-10">
+						<text v-if="item.heatType=='HEAT_VALUE_EXCHANGE'"
+							class="center reduce">{{item.voteCount}}</text>
+						<text v-if="item.heatType=='HEAT_VALUE_SEND'" class="center plus">{{item.voteCount}}</text>
+					</view>
 				</view>
 			</view>
-		</mescroll-body-diy>
+		</mescroll-body>
 	</view>
 </template>
 
 <script>
-	import MescrollBodyDiy from "@/uni_modules/mescroll-uni/components/mescroll-diy/xinlang/mescroll-body.vue";
 	import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
 	export default {
 		mixins: [MescrollMixin],
-		components: {
-			MescrollBodyDiy,
-		},
 		data() {
 			return {
 				downOption: {
@@ -42,10 +43,10 @@
 			}
 		},
 		methods: {
-			jump(item){
+			jump(item) {
 				if (this.$isNotEmpty(item.activeProductId)) {
 					uni.navigateTo({
-						url:'/pages/activity/activityDetail?id='+item.activeProductId
+						url: '/pages/activity/activityDetail?id=' + item.activeProductId
 					})
 				}
 			},
@@ -57,7 +58,7 @@
 			upCallback(mescroll) {
 				try {
 					let params = {
-						userId: this.vuex_userId,
+						phone: this.vuex_phone,
 						current: mescroll.num,
 						size: mescroll.size,
 					}
@@ -82,23 +83,27 @@
 		background-color: #FFFFFF;
 		margin: 20rpx 0;
 		padding: 35rpx;
+		display: flex;
+		justify-content: space-between;
 
-		.card-top {
-			display: flex;
-			justify-content: space-between;
-			color: #353535;
-			font-size: 32rpx;
-			margin-bottom: 20rpx;
-			font-family: PingFang-SC-Bold;
+		.card-left {
+			.title {
+				color: #353535;
+				font-size: 32rpx;
+				margin-bottom: 20rpx;
+				font-family: PingFang-SC-Bold;
+			}
+
+			.time {
+				margin-top: 20rpx;
+				color: #999999;
+				font-size: 26rpx;
+				font-weight: 400;
+			}
 		}
 
-		.card-bottom {
+		.card-right {
 			display: flex;
-			justify-content: space-between;
-			margin-top: 20rpx;
-			color: #999999;
-			font-size: 26rpx;
-			font-weight: 400;
 		}
 	}
 </style>

+ 9 - 10
pages/mine/my-help/my-help.vue

@@ -1,32 +1,30 @@
 <template>
 	<view>
-		<mescroll-body-diy ref="mescrollRef" @init="mescrollInit" :down="downOption" @down="downCallback"
+		<mescroll-body ref="mescrollRef" @init="mescrollInit" :down="downOption" @down="downCallback"
 			@up="upCallback">
 			<view class="card" @click="goDetail(item)" v-for="(item,index) in list" :key="index">
-				<view class="card-left">
-					<view class="title">{{item.productTitle}}</view>
-					<view class="center time">{{item.createTime}}</view>
+				<view class="card-left" style="width: 75%;">
+					<view class="title text-cut-1 flex" style="justify-content: flex-start;">{{item.productTitle}}</view>
+					<view class="center time flex" style="justify-content: flex-start;">
+						<text>{{item.createTime}}</text>
+					</view>
 				</view>
 
-				<view class="card-right">
+				<view class="card-right" style="width: 25%;">
 					<view class="center">
 						<image style="height: 52rpx;width: 90rpx;"   :src="item.helpGoods.imgUrl"></image>
 					</view>
 					<view class="center margin-left-20">x {{item.voteCount}}</view>
 				</view>
 			</view>
-		</mescroll-body-diy>
+		</mescroll-body>
 	</view>
 </template>
 
 <script>
-	import MescrollBodyDiy from "@/uni_modules/mescroll-uni/components/mescroll-diy/xinlang/mescroll-body.vue";
 	import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
 	export default {
 		mixins: [MescrollMixin],
-		components: {
-			MescrollBodyDiy,
-		},
 		data() {
 			return {
 				downOption: {
@@ -95,6 +93,7 @@
 		}
 
 		.card-right {
+			justify-content: flex-end;
 			display: flex;
 		}
 	}

+ 15 - 9
pages/mine/my-product/my-product.vue

@@ -1,10 +1,10 @@
 <template>
 	<view :style="vuex_skin">
-		<mescroll-body-diy ref="mescrollRef" @init="mescrollInit" :down="downOption" @down="downCallback"
+		<mescroll-body ref="mescrollRef" @init="mescrollInit" :down="downOption" @down="downCallback"
 			@up="upCallback">
 			<image :src="cover" style="width: 100vw;" mode="widthFix"></image>
 			<view class="head">
-				<view class="cu-avatar avatar round" :style="[{backgroundImage:'url('+ userInfo.avatar +')'}]"></view>
+				<image :src="userInfo.avatar" mode="" class="avatar"></image>
 				<view style="margin: 0 30upx 30upx 70upx;">
 					<view class="flex align-center">
 						<view class="text-black text-bold text-xl padding-right">{{userInfo.nickName}}</view>
@@ -52,18 +52,14 @@
 					</view>
 				</view>
 			</view>
-		</mescroll-body-diy>
+		</mescroll-body>
 	</view>
 </template>
 
 <script>
-	import MescrollBodyDiy from "@/uni_modules/mescroll-uni/components/mescroll-diy/xinlang/mescroll-body.vue";
 	import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
 	export default {
 		mixins: [MescrollMixin],
-		components: {
-			MescrollBodyDiy,
-		},
 		data() {
 			return {
 				downOption: {
@@ -77,8 +73,17 @@
 		},
 		onLoad(options) {
 			this.fetchUserInfo()
+			this.fetchCover()
 		},
 		methods: {
+			async fetchCover() {
+				let {
+					ACTIVE_SETTING
+				} = (await this.$api.platform.getPlatformParams({
+					keys: 'ACTIVE_SETTING'
+				})).data.data;
+				this.cover = JSON.parse(ACTIVE_SETTING).myProductImage
+			},
 			fetchUserInfo() {
 				if (this.$cache.get('userInfo')) {
 					this.userInfo = this.$cache.get('userInfo')
@@ -93,7 +98,7 @@
 			},
 			fetchMyTotalHeatValue(){
 				let params={
-					phone: "13712703133"
+					phone: this.vuex_phone
 				}
 				this.$api.activity.getMyTotalHeat(params).then(res=>{
 					this.totalHeatValue=res.data.data || 0
@@ -113,7 +118,7 @@
 					let params = {
 						current: mescroll.num,
 						size: mescroll.size,
-						phone: "13712703133"
+						phone: this.vuex_phone
 					}
 					this.$api.activity.list(params).then(res => {
 						let data = res.data.data.records
@@ -140,6 +145,7 @@
 	}
 
 	.avatar {
+		border-radius: 50%;
 		width: 120upx;
 		height: 120upx;
 		margin: -50upx 0 30upx 80upx;

+ 143 - 0
pages/mine/order/comps/card.vue

@@ -0,0 +1,143 @@
+<template>
+	<view>
+		<navigator :url="'/pages/mine/order/detail?id='+item.id" hover-class="none" class="card" v-for="(item,index) in list" :key="index">
+			<view class="top">
+				<text>{{item.createTime}}</text>
+				<text>{{item.goodsStatus}}</text>
+			</view>
+
+			<view class="content">
+				<view class="">
+					<image :src="item.goodsImgUrl" mode=""></image>
+				</view>
+				<view class="container">
+					<view class="title">
+						<text class="text-cut-1">{{item.goodsName}}</text>
+					</view>
+
+					<view class="data">
+						<text>使用积分:{{item.usePoint}}</text>
+						<text class="margin-left-30">现金支付:{{useCash(item)}}元</text>
+					</view>
+				</view>
+			</view>
+			<view class="bottom">
+				<u-button v-if="item.goodsStatus == '待收货' || item.goodsStatus == '已完成'" @click="queryLogistic(item)" :custom-style="customStyle1" shape="circle" size="mini">查看物流
+				</u-button>
+				<u-button open-type="contact"   :custom-style="customStyle2" shape="circle" size="mini">咨询客服</u-button>
+				<u-button @click="confirmReceipt(item)" v-if="item.goodsStatus == '待收货'" :custom-style="customStyle3" shape="circle" size="mini">确认订单</u-button>
+				<u-button @click="exchange" v-else :custom-style="customStyle3" shape="circle" size="mini">再次兑换</u-button>
+			</view>
+		</navigator>
+		<toast ref="toast"></toast>
+	</view>
+</template>
+
+<script>
+	export default {
+		props: {
+			list: Array
+		},
+		data() {
+			return {
+				customStyle1: {
+					marginRight: '20rpx',
+					color: '#353535',
+					borderColor: '#999999'
+				},
+				customStyle2: {
+					marginRight: '20rpx',
+					color: '#353535',
+					borderColor: '#999999'
+				},
+				customStyle3: {
+					backgroundColor: "#E72226",
+					color: '#fff'
+				}
+			}
+		},
+		computed:{
+			useCash(){
+				return data=>{
+					if (data.cash==-1 || this.$isEmpty(data.cash)) {
+						return 0
+					}
+					return data.cash
+				}
+			}
+		},
+		methods: {
+			confirmReceipt(item){
+				this.$emit("confirmReceipt",item.id)
+			},
+			exchange(){
+				uni.switchTab({
+					url:"/pages/shop/shop"
+				})
+			},
+			queryLogistic(item) {
+				uni.navigateTo({
+					url: "/pages/mine/logistics/logistics?id=" + item.id,
+					fail(err) {
+						console.log(err);
+					}
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.card {
+		background-color: #FFFFFF;
+		margin: 20rpx 0;
+		padding: 20rpx 30rpx;
+
+		.top {
+			display: flex;
+			justify-content: space-between;
+			font-family: PingFang-SC-Medium;
+			font-size: 24rpx;
+			color: #999999;
+		}
+
+		.content {
+			padding: 30rpx 0;
+			display: flex;
+			width: 100%;
+
+			image {
+				width: 130rpx;
+				height: 130rpx;
+				border-radius: 10rpx;
+				margin-right: 20rpx;
+			}
+
+			.container {
+				display: flex;
+				flex-direction: column;
+				justify-content: space-around;
+
+				.title {
+					font-weight: 800;
+					color: #353535;
+					font-family: PingFang-SC-Bold;
+					font-size: 30rpx;
+				}
+
+				.data {
+					color: #000000;
+					font-weight: 300;
+					font-size: 26rpx;
+				}
+			}
+		}
+
+		.bottom {
+			padding-top: 20rpx;
+			border-top: 1rpx solid #EEEEEE;
+			display: flex;
+			justify-content: flex-end;
+		}
+	}
+</style>

+ 115 - 0
pages/mine/order/comps/item.vue

@@ -0,0 +1,115 @@
+<template>
+	<view class="">
+		<mescroll-uni :up="up" :down="down" @up="upFn" :fixed="false" @down="downFn" @init="initMeScroll">
+			<card :list="list" @confirmReceipt="confirmReceipt"></card>
+		</mescroll-uni>
+		<toast ref="toast" ></toast>
+	</view>
+</template>
+<script>
+	import mescrollUni from '@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-uni.vue'
+	import card from './card.vue'
+	export default {
+		components: {
+			mescrollUni,
+			card
+		},
+		props: {
+			type: Number,
+			i: Number,
+			item: Object
+		},
+		data() {
+			return {
+				isInit: false, // 是否初始化
+				list: [], // 列表数据
+				mescroll: null, // mescroll 对象
+				// 上拉配置参数
+				up: {
+					noMoreSize: 5,
+					auto: false,
+					page: {
+						page: 0,
+						size: 10
+					}
+				},
+				// 下拉配置参数
+				down: {
+					use: false,
+					auto: false
+				}
+			}
+		},
+		created() {
+
+		},
+		watch: {
+			type(val) {
+				if (!this.isInit && val === this.i) {
+					this.mescroll.resetUpScroll()
+				}
+			}
+		},
+		mounted() {
+			if (!this.isInit && this.i === 0) {
+				this.mescroll.resetUpScroll()
+			}
+		},
+		methods: {
+			confirmReceipt(id){
+				this.$dialog.showModal('确定收货?',true,this.vuex_theme.bgColor).then(res=>{
+					let params={
+						id,
+						goodsStatus:'已完成'
+					}
+					this.$api.goodsorder.submit(params).then(res=>{
+						if (res.data.success) {
+							this.$refs.toast.info('操作成功')
+							this.mescroll.resetUpScroll()
+						}
+					})
+				})
+			},
+			//初始化组件
+			initMeScroll(mescroll) {
+				this.mescroll = mescroll
+			},
+			//上拉回调
+			upFn(mescroll) {
+				let params = {
+					userId: this.vuex_userId,
+					current: mescroll.num,
+					size: mescroll.size,
+				}
+				if (this.item.value!='全部') {
+					params.goodsStatus=this.item.value
+				}
+				
+				try {
+					this.$api.goodsorder.list(params).then(res => {
+						let data = res.data.data.records
+						let length = data.length
+						let total = res.data.data.total
+						mescroll.endBySize(length, total);
+						if (mescroll.num == 1) this.list = []; //如果是第一页需手动制空列表
+						this.list = this.list.concat(data); //追加新数据
+					})
+				} catch (e) {
+					mescroll.endErr();
+				}
+			},
+			//下拉回调
+			downFn(mescroll) {
+				setTimeout(() => {
+					this.mescroll.resetUpScroll()
+				}, 1500)
+			},
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	view {
+		box-sizing: border-box;
+	}
+</style>

+ 244 - 0
pages/mine/order/detail.vue

@@ -0,0 +1,244 @@
+<template>
+	<view style="padding: 0 20rpx;" :style="vuex_skin">
+		<image style="width: 100vw;height: 8rpx;" src="@/static/icon/divider.png" mode=""></image>
+		<view class="title border-bottom" style="padding-top: 30rpx;">
+			<text>收货人信息</text>
+		</view>
+		<view class="data">
+			<view class="flex">
+				<view style="color:#a0a0a0;width: 23%;">收货人:</view>
+				<view class="center">{{detail.consignee}}</view>
+				<view class="margin-left-50 center">
+					<text>{{detail.phone}}</text>
+				</view>
+			</view>
+			<view class="flex" style="padding-top: 35rpx;">
+				<view style="color:#a0a0a0;width: 23%;">收货地址:</view>
+				<text class="">{{detail.address}}</text>
+			</view>
+		</view>
+		<u-gap height="20" bg-color="#f6f6f6"></u-gap>
+
+		<view class="title border-bottom">
+			<text>商品信息</text>
+		</view>
+
+		<view class="goods border-bottom">
+			<view class="">
+				<image :src="detail.goodsImgUrl" mode=""></image>
+			</view>
+
+			<view class="content">
+				<view class="text-cut-2" style="font-size: 28rpx;">{{detail.goodsName}}</view>
+				<view style="color: #9e9e9e;">
+					<text>价格:</text>
+					<text class="text-price">{{detail.goodsPoint}} 积分</text>
+					<text class="cuIcon-close margin-left-50" style="font-size: 22rpx;"></text>
+					<text class="" style="font-size: 24rpx;">{{detail.num}}</text>
+				</view>
+			</view>
+		</view>
+
+		<view class="price-data">
+			<view class="">
+				<text style="color: #959595;">商品总价:</text>
+				<text class="" style="color: #1e1e1e;">{{$digital.floatMul(detail.goodsPoint,detail.num)}} 积分</text>
+			</view>
+			<view class="">
+				<text style="color: #959595;">使用积分:</text>
+				<text class="" style="color: #1e1e1e;">{{detail.usePoint}} 积分</text>
+			</view>
+			<view class="">
+				<text style="color: #959595;">使用现金:</text>
+				<text class="" style="color: #1e1e1e;">{{useCash(detail)}} 元</text>
+			</view>
+		</view>
+
+		<u-gap height="20" bg-color="#f6f6f6"></u-gap>
+
+		<view class="title border-bottom">
+			<text>订单信息</text>
+		</view>
+
+		<view class="price-data">
+			<view class="">
+				<text style="color: #959595;">订单状态:</text>
+				<text class="" style="color: #1e1e1e;">{{detail.goodsStatus}}</text>
+			</view>
+
+			<view class="">
+				<text style="color: #959595;">物流编号:</text>
+				<text class=""
+					style="color: #1e1e1e;">{{detail.trackingNumber==-1 || $isEmpty(detail.trackingNumber)?'暂无物流':detail.trackingNumber}}</text>
+			</view>
+			<view class="">
+				<text style="color: #959595;">物流公司:</text>
+				<text class="" style="color: #1e1e1e;">{{detail.trackingName || '暂无物流'}}</text>
+			</view>
+			<view class="">
+				<text style="color: #959595;">订单编号:</text>
+				<text class="" style="color: #1e1e1e;" @click="$util.copy(detail.id)">{{detail.id}}</text>
+			</view>
+			<view class="">
+				<text style="color: #959595;">创建时间:</text>
+				<text class="" style="color: #1e1e1e;">{{detail.createTime}}</text>
+			</view>
+		</view>
+
+		<block>
+			<view class="" style="height: 250rpx;"></view>
+			<view class="footer-fixed flex bg-white u-border-top" style="justify-content: flex-end;padding: 25rpx 0;">
+				<u-button v-if="detail.goodsStatus == '待收货' || detail.goodsStatus == '已完成'" @click="queryLogistic"
+					:custom-style="customStyle1" shape="circle">查看物流
+				</u-button>
+				<u-button open-type="contact" :custom-style="customStyle2" shape="circle">咨询客服</u-button>
+				<u-button @click="confirmReceipt" v-if="detail.goodsStatus == '待收货'" :custom-style="customStyle3"
+					shape="circle" size="mini">确认订单</u-button>
+				<u-button @click="exchange" :custom-style="customStyle3" v-else shape="circle">再次兑换</u-button>
+			</view>
+		</block>
+		<toast ref="toast" ></toast>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				id: '',
+				detail: {},
+				customStyle1: {
+					marginRight: '15rpx',
+					color: '#353535',
+					borderColor: '#999999',
+					height: '60rpx',
+					width: '180rpx',
+					fontSize: '24rpx'
+				},
+				customStyle2: {
+					marginRight: '15rpx',
+					color: '#353535',
+					borderColor: '#999999',
+					height: '60rpx',
+					width: '180rpx',
+					fontSize: '24rpx'
+				},
+				customStyle3: {
+					backgroundColor: "#E72226",
+					color: '#fff',
+					height: '60rpx',
+					width: '180rpx',
+					fontSize: '24rpx',
+					marginRight: '15rpx',
+				}
+			}
+		},
+		computed: {
+			useCash() {
+				return data => {
+					if (data.cash == -1 || this.$isEmpty(data.cash)) {
+						return 0
+					}
+					return data.cash
+				}
+			}
+		},
+		onLoad(options) {
+			this.id = options.id
+			this.fetchDetail()
+		},
+		methods: {
+			exchange() {
+				uni.switchTab({
+					url: "/pages/shop/shop"
+				})
+			},
+			fetchDetail() {
+				let params = {
+					id: this.id
+				}
+				this.$api.goodsorder.detail(params).then(res => {
+					this.detail = res.data.data
+				})
+			},
+			queryLogistic() {
+				uni.navigateTo({
+					url: "/pages/mine/logistics/logistics?id=" + this.id,
+					fail(err) {
+						console.log(err);
+					}
+				})
+			},
+			confirmReceipt() {
+				this.$dialog.showModal('确定收货?', true, this.vuex_theme.bgColor).then(res => {
+					let params = {
+						id:this.id,
+						goodsStatus: '已完成'
+					}
+					this.$api.goodsorder.submit(params).then(res => {
+						if (res.data.success) {
+							this.$refs.toast.info('操作成功')
+							this.fetchDetail()
+						}
+					})
+				})
+			},
+		}
+	}
+</script>
+
+<style>
+	page {
+		background-color: #FFFFFF;
+	}
+</style>
+
+<style lang="scss">
+	.border-bottom {
+		border-bottom: 1rpx solid #e2e2e2;
+	}
+
+	.title {
+		padding: 35rpx 20rpx;
+		font-size: 30rpx;
+		color: #000;
+	}
+
+	.data {
+		padding: 35rpx 20rpx;
+
+	}
+
+	.goods {
+		display: flex;
+		padding: 25rpx 20rpx;
+		width: 100%;
+
+		image {
+			width: 150rpx;
+			height: 150rpx;
+			border-radius: 12rpx;
+		}
+
+		.content {
+			line-height: 42rpx;
+			font-size: 26rpx;
+			margin-left: 20rpx;
+			display: flex;
+			flex-direction: column;
+			justify-content: space-around;
+		}
+	}
+
+	.price-data {
+		padding: 25rpx 20rpx;
+		display: flex;
+		flex-direction: column;
+
+		view {
+			padding: 15rpx 0;
+			display: flex;
+			justify-content: space-between;
+		}
+	}
+</style>

+ 96 - 0
pages/mine/order/order.vue

@@ -0,0 +1,96 @@
+<template>
+	<view class="container" :style="vuex_skin">
+		<view class="tabs flex flex-direction">
+			<scroll-view scroll-x class="bg-white nav">
+				<view class="flex text-center">
+					<view class="cu-item flex-sub" :class="index==current?'text-base cur text-xl text-bold ':'text-lg'"
+						v-for="(item,index) in tabs" :key="index" @tap="tabChange(index)">
+						{{item.name}}
+					</view>
+				</view>
+			</scroll-view>
+		</view>
+		<view style="height: 100%;">
+			<swiper style="height: 100%;" :current="current" @change="swiperChange" @animationfinish="animationfinish">
+				<swiper-item v-for="(item, index) in tabs" :key="index">
+					<scroll-view scroll-y style="height: 100%;">
+						<item @showOpinion="showOpinion" ref="mescrollItem" :i="index" :item="item" :type="current">
+						</item>
+					</scroll-view>
+				</swiper-item>
+			</swiper>
+		</view>
+	</view>
+</template>
+<script>
+	import item from "./comps/item.vue"
+	export default {
+		components: {
+			item
+		},
+		data() {
+			return {
+				current: 0,
+				swiperCurrent: 0,
+				tabs: [{
+						name: '全部',
+						value: '全部'
+					}, {
+						name: '待付款',
+						value: '待付款'
+					},
+					{
+						name: '待发货',
+						value: '待发货'
+					},
+					{
+						name: '待收货',
+						value: '待收货'
+					},
+					{
+						name: '已完成',
+						value: '已完成'
+					}
+				],
+			}
+		},
+		methods: {
+			tabChange(index) {
+				this.current = index
+			},
+			swiperChange(e) {
+				uni.pageScrollTo({
+					scrollTop: 0,
+					duration: 0
+				});
+				this.current = e.detail.current
+			},
+			animationfinish({
+				detail: {
+					current
+				}
+			}) {
+				this.swiperCurrent = current;
+				this.current = current;
+			},
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.container {
+		height: calc(100vh);
+		background-color: #F6F6F6;
+		padding: 80rpx 0rpx 0rpx;
+
+		.tabs {
+			position: fixed;
+			top: -10rpx;
+			left: 0;
+			width: 100%;
+			background-color: #FFFFFF;
+			box-sizing: border-box;
+			z-index: 3;
+		}
+	}
+</style>

+ 14 - 12
pages/mine/points/pointsDetail.vue

@@ -9,11 +9,11 @@
 				<view class="text-center" style="margin-top: 150upx;">
 					<view style="font-size: 26upx;color: #FFFFFF;font-weight: 400;">可用积分</view>
 					<view style="font-size: 58upx;margin-top: 7rpx;color: #ffffff;">
-						{{userData.pufaPoint}}
+						{{userPoint || 0}}
 					</view>
 				</view>
 			</view>
-			<mescroll-body-diy ref="mescrollRef" @init="mescrollInit" :down="downOption" :up="upOption" @down="downCallback"
+			<mescroll-body ref="mescrollRef" @init="mescrollInit" :down="downOption" :up="upOption" @down="downCallback"
 				@up="upCallback">
 				<view class="flex justify-between align-center container " v-for="(item, index) in list" :key="index">
 					<view class="padding">
@@ -26,24 +26,22 @@
 						<view class="points" :class="symbol(item.pointType)?symbol(item.pointType):''">{{item.point}} 积分</view>
 					</view>
 				</view>
-			</mescroll-body-diy>
+			</mescroll-body>
 		</view>
 	</view>
 </template>
 
 <script>
 	import back from "@/components/back.vue"
-	import MescrollBodyDiy from "@/uni_modules/mescroll-uni/components/mescroll-diy/xinlang/mescroll-body.vue";
 	import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
 	export default {
 		mixins: [MescrollMixin],
 		components: {
 			back,
-			MescrollBodyDiy,
 		},
 		data() {
 			return {
-				userData:{},
+				userPoint:0,
 				title: '积分明细',
 				backShow: true,
 
@@ -83,15 +81,18 @@
 		},
 		onLoad() {
 			this.mescroll.resetUpScroll();
-			this.fetchPoints()
+			this.fetchUserPufaPoint()
 		},
 		methods: {
-			fetchPoints(){
-				let params={
-					id:this.vuex_userId
+			fetchUserPufaPoint() {
+				if (!this.vuex_phone) {
+					return
 				}
-				this.$api.loginUser.detail(params).then(res=>{
-					this.userData=res.data.data
+				let params = {
+					phone: this.vuex_phone
+				}
+				this.$api.loginUser.userHeatValueAndPufaPoint(params).then(res => {
+					this.userPoint=res.data.data.userPufaPoint
 				})
 			},
 			downCallback() {
@@ -104,6 +105,7 @@
 					let params = {
 						current: mescroll.num,
 						size: mescroll.size,
+						userId: this.vuex_userId
 					}
 					this.$api.points.list(params).then(res => {
 						let data = res.data.data.records

+ 4 - 4
pages/rank/rank.vue

@@ -32,7 +32,7 @@
 											</view>
 										</view>
 										<view class="center">
-											<text class="name text-cut-1">{{item.title}}111111111111</text>
+											<text class="name text-cut-1">{{item.title}}</text>
 										</view>
 									</view>
 									<view class="padding-tb-sm text-sm center"
@@ -46,7 +46,7 @@
 										<view class="hot-value center" style="justify-content: flex-start;">
 											<image src="../../static/rank/hot.png" style="width: 36rpx;height: 36rpx;"
 												mode=""></image>
-											<text>{{item.voteCount}}</text>
+											<text style="padding-left: 4rpx;">{{item.voteCount}}</text>
 										</view>
 										<button @click.stop="$jump('/pages/activity/activityDetail?id='+item.id+'&isCustomBack=false')"
 											class="cu-btn round  bg-base sm text-white"
@@ -94,7 +94,7 @@
 										<view class="hot-value center" style="justify-content: flex-start;">
 											<image src="../../static/rank/hot.png" style="width: 36rpx;height: 36rpx;"
 												mode=""></image>
-											<text>{{item.voteCount}}</text>
+											<text style="padding-left: 4rpx;">{{item.voteCount}}</text>
 										</view>
 										<button @click.stop="$jump('/pages/activity/activityDetail?id='+item.id+'&isCustomBack=false')"
 											class="cu-btn round bg-base sm text-white"
@@ -166,7 +166,7 @@
 			setTimeout(() => {
 				this.loading = false
 				this.$refs.loading.hide()
-			}, 500)
+			}, 80)
 			this.getList(0);
 		},
 		methods: {

+ 1 - 11
pages/rule/point.vue

@@ -1,7 +1,6 @@
 <template>
 	<view class="u-content">
-		<u-parse :html="content" v-show="!loading"></u-parse>
-		<loading ref="loading" type="3"/>
+		<u-parse :html="content" ></u-parse>
 	</view>
 </template>
 
@@ -9,12 +8,10 @@
 	export default {
 		data() {
 			return {
-				loading:true,
 				content: ''
 			}
 		},
 		onLoad() {
-			this.$refs.loading.showLoading()
 			this.fetchDetail()
 		},
 		methods:{
@@ -24,15 +21,8 @@
 				}
 				this.$api.notice.detail(params).then(res=>{
 					this.content=res.data.data.content
-					this.hideLoading()
 				})
 			},
-			hideLoading(){
-				setTimeout(()=>{
-					this.$refs.loading.hide()
-					this.loading=false
-				},300)
-			}
 		}
 	}
 </script>

+ 1 - 11
pages/rule/rule.vue

@@ -1,7 +1,6 @@
 <template>
 	<view class="u-content">
-		<u-parse :html="content" v-show="!loading"></u-parse>
-		<loading ref="loading" type="3"/>
+		<u-parse :html="content" ></u-parse>
 	</view>
 </template>
 
@@ -9,12 +8,10 @@
 	export default {
 		data() {
 			return {
-				loading:true,
 				content: ''
 			}
 		},
 		onLoad() {
-			this.$refs.loading.showLoading()
 			this.fetchDetail()
 		},
 		methods:{
@@ -24,15 +21,8 @@
 				}
 				this.$api.notice.detail(params).then(res=>{
 					this.content=res.data.data.content
-					this.hideLoading()
 				})
 			},
-			hideLoading(){
-				setTimeout(()=>{
-					this.$refs.loading.hide()
-					this.loading=false
-				},300)
-			}
 		}
 	}
 </script>

+ 232 - 97
pages/shop/detail.vue

@@ -1,81 +1,107 @@
 <template>
 	<view :style="vuex_skin">
-		<view class="goods">
-			<image @click="$util.preview(detail.imgUrl)" :src="detail.imgUrl" style="width: 100vw;" mode="widthFix"></image>
-			<view class="title">
-				<view class="text-bold" style="color: #353535;font-family: PingFang-SC-Bold;font-size: 34rpx;">{{detail.name}}</view>
-				<view class=" text-base" style="padding: 20rpx 0;">
-					<view class="text-bold text-lg">
-						{{detail.point}}
-						<text style="padding-left: 6rpx;">积分</text>
+		<view>
+			<view class="goods">
+				<image @click="$util.preview(detail.imgUrl)" :src="detail.imgUrl" style="width: 100vw;" mode="widthFix">
+				</image>
+				<view class="title">
+					<view class="text-bold" style="color: #353535;font-family: PingFang-SC-Bold;font-size: 34rpx;">
+						<text>{{detail.name}}</text>
+						<text class="red" v-if="detail.isLimit">(每人限购{{detail.limitBuy}}个)</text>
 					</view>
-				</view>
-				<block v-if="!$u.test.isEmpty(detail.content)">
-					<view class="text-sm" style="color: #888888;line-height: 42rpx;">产品说明:{{detail.content}}</view>
-				</block>
-			</view>
-		</view>
-		<block v-if="exchangeShow">
-			<view hover-class="none" class="container flex align-center justify-between"
-				style="border-bottom: 1rpx solid #efefef;">
-				<view class="flex padding align-center">
-					<image src="@/static/mine/address.png" style="width: 65upx;height: 65upx;"></image>
-					<view class="padding-left text-sm" v-if="!$u.test.isEmpty(address)">
-						<view style="font-size: 28upx;font-family: PingFang SC;font-weight: 800;color: #000000;">
-							{{address.consignee}} {{address.phone}}
+					<view class=" text-base" style="padding: 20rpx 0;">
+						<view class="text-bold text-lg">
+							{{detail.point || 0}}
+							<text style="padding-left: 6rpx;">积分</text>
 						</view>
-						<view class="text-gray">{{address.address}}</view>
 					</view>
-					<view class="padding-left"
-						style="font-size: 28upx;font-family: PingFang SC;font-weight: 800;color: #000000;" v-else>
-						请选择收货地址</view>
-				</view>
-				<view class="padding">
-					<u-icon name="arrow-right" color="#d4d4d4"></u-icon>
+					<block v-if="!$u.test.isEmpty(detail.content)">
+						<view class="text-sm" style="color: #888888;line-height: 42rpx;">产品说明:
+							<u-parse :html="detail.content"></u-parse>
+						</view>
+					</block>
 				</view>
 			</view>
+			<view v-if="exchangeShow" style="padding: 60rpx da;">
+				<navigator url="/pages/address/address" hover-class="none"
+					class="container flex align-center justify-between" style="border-bottom: 1rpx solid #efefef;">
+					<view class="flex padding align-center">
+						<image src="@/static/mine/address.png" style="width: 65upx;height: 65upx;"></image>
+						<view class="padding-left text-sm" v-if="!$u.test.isEmpty(address)">
+							<view style="font-size: 28upx;font-family: PingFang SC;font-weight: 800;color: #000000;">
+								{{address.consignee}} {{address.phone}}
+							</view>
+							<view class="text-gray">{{address.address}}</view>
+						</view>
+						<view class="padding-left"
+							style="font-size: 28upx;font-family: PingFang SC;font-weight: 800;color: #000000;" v-else>
+							请选择收货地址</view>
+					</view>
+					<view class="padding">
+						<u-icon name="arrow-right" color="#d4d4d4"></u-icon>
+					</view>
+				</navigator>
 
-			<view class="padding-sm">
-				<view class="flex padding-xs">
-					<text class="flex justify-center align-center">积分数:</text>
-					<u-number-box :disabled="$u.test.isEmpty(userInfo.pufaPoint)" @change="pufaPointChange"
-						:input-width="200" :min="0" v-model="data.pufaPoint">
-					</u-number-box>
+				<view class="padding-sm">
+					<view class="flex padding-xs">
+						<text class="flex justify-center align-center">兑换数量:</text>
+						<u-number-box :step="1" :disabled="$u.test.isEmpty(detail.remain)" @change="numChange"
+							:input-width="150" :min="1" :max="maxNum" v-model="exChangeData.num">
+						</u-number-box>
+						<view class="center" style="color: #888888;margin-left: 20rpx;font-family: PingFang-SC-Medium;">
+							<text>剩余库存: {{detail.remain || 0}}</text>
+						</view>
+					</view>
+					<view class="flex padding-xs">
+						<text class="flex justify-center align-center">积分数量:</text>
+						<u-number-box :step="10" :disabled="$u.test.isEmpty(userData.userPufaPoint)"
+							@change="pufaPointChange" :input-width="150" :min="0" :max="maxValue"
+							v-model="exChangeData.point">
+						</u-number-box>
+						<view class="center" style="color: #888888;margin-left: 20rpx;font-family: PingFang-SC-Medium;">
+							<text>可用积分: {{userData.userPufaPoint || 0}}</text>
+						</view>
+					</view>
 				</view>
 			</view>
-		</block>
-
-		<view class="" style="height: 140rpx;">
+			<view class="" style="height: 300rpx;">
 
+			</view>
 		</view>
-
-		<view v-if="!exchangeShow" class="footer-fixed flex align-center justify-end padding bg-white"
-			style="padding: 30rpx;;border-top: 1rpx solid #e5e5e5;z-index: 9;">
-			<button class="cu-btn round text-white bg-base" style="width: 180upx;height: 80upx;"
-				@click="$refs.toast.info('暂未开放')">兑换</button>
-		</view>
-
-		<view v-else class="footer-fixed flex align-center justify-between  bg-white"
-			style="border-top: 1rpx solid #e5e5e5;padding: 30rpx;z-index: 9;">
-			<view class="text-red">
-				<text>需支付</text>
-				<text>¥</text>
-				<text>{{cashValue}}</text>
+		<view class="bottom-change">
+			<view v-if="!exchangeShow" class="footer-fixed flex align-center justify-end  bg-white"
+				style="padding:30rpx;;border-top: 1rpx solid #e5e5e5;z-index: 9;">
+				<button class="cu-btn round text-white bg-base" style="width: 180upx;height: 80upx;"
+					@click="login">兑换</button>
 			</view>
-			<view>
-				<button class="cu-btn round text-white bg-base" style="width: 180upx;height: 80upx;margin-right: 10upx;"
-					@click="confirm">兑换</button>
-				<button @click="exchangeShow = false" class="cu-btn round line-gray"
-					style="width: 180upx;height: 80upx;z-index: 99;">取消</button>
+			<view v-else class="footer-fixed flex align-center justify-between  bg-white"
+				style="border-top: 1rpx solid #e5e5e5;padding: 30rpx;z-index: 9;">
+				<view class="text-red flex-direction flex" v-if="pointValue>0">
+					<text>仍需{{pointValue}}积分</text>
+				</view>
+				<view class="" v-else>
+
+				</view>
+				<view>
+					<button class="cu-btn round text-white bg-base"
+						style="width: 180upx;height: 80upx;margin-right: 10upx;" @click="confirm">兑换</button>
+					<button @click="exchangeShow=false" class="cu-btn round line-gray"
+						style="width: 180upx;height: 80upx;z-index: 99;">取消</button>
+				</view>
 			</view>
 		</view>
 		<login ref="login" @signIn="signIn" @phoneSuccess="phoneSuccess"></login>
-		<toast ref="toast" ></toast>
+		<toast ref="toast"></toast>
+		<exchange-success ref="exchangeSuccess"></exchange-success>
 	</view>
 </template>
 
 <script>
+	import exchangeSuccess from "@/components/alert/exchangeSuccess.vue"
 	export default {
+		components: {
+			exchangeSuccess
+		},
 		data() {
 			return {
 				id: '',
@@ -83,15 +109,19 @@
 				detail: {},
 				//商品地址
 				address: {},
-				//用户信息
-				userInfo: {},
 				//点击兑换
 				exchangeShow: false,
-				//兑换的积分数
-				cashValue: 0,
-				data: {
-					pufaPoint: 0
+				//我的积分数
+				userData: {
+					userPufaPoint: ''
 				},
+				maxNum:1,
+				maxValue: 0,
+				//兑换的数据
+				exChangeData: {
+					num: 1,
+					point: 0
+				}
 			}
 		},
 		onLoad(options) {
@@ -101,64 +131,165 @@
 				return
 			}
 			this.fetchGoodsDetail()
-			this.fetchUserInfo()
 		},
 		onShow() {
-			this.getAddress()
+			this.address = this.$util.getBackParams('addressData')
+			if (this.$isEmpty(this.address)) {
+				this.getAddress()
+			}
+		},
+		computed: {
+			pointValue: {
+				get() {
+					let m = this.$digital.floatMul(this.detail.point, this.exChangeData.num)
+					let n = this.exChangeData.point
+					let val = this.$digital.floatSub(m, n)
+					if (val < 0) {
+						val = 0
+						this.$u.toast('不可以超过商品所需积分')
+						return val
+					}
+					return val
+				}
+			},
 		},
 		methods: {
-			pufaPointChange(e) {
-			
+			resetData() {
+				this.userData = {
+					userPufaPoint: ''
+				}
+				this.exChangeData = {
+					num: 1,
+					point: 0
+				}
 			},
-
-
-
-
-
-
-
-
-
-
 			/**
-			 * 获取用户信息
+			 * 确认兑换
 			 */
-			fetchUserInfo() {
-				if (this.$cache.get('userInfo')) {
-					this.userInfo = this.$cache.get('userInfo')
+			async confirm() {
+				if (this.detail.remain < this.exChangeData.num) {
+					this.$refs.toast.error('库存不足')
+					return
+				}
+				if (this.$isEmpty(this.address)) {
+					this.$refs.toast.error('请选择收货地址')
 					return
 				}
 				if (this.$isEmpty(this.vuex_userId)) {
-					this.showLogin()
+					this.$refs.toast.error('用户未登录')
+					return
+				}
+				if (this.$isEmpty(this.userData.userPufaPoint)) {
+					this.$refs.toast.error('无可用积分')
+					return
+				}
+				if (this.pointValue > 0) {
+					this.$refs.toast.error('积分不足')
+					return
+				}
+				if (this.pointValue < 0) {
+					this.$refs.toast.error('不可以超过商品所需积分')
+					return
+				}
+				if (this.exChangeData.point > this.userData.userPufaPoint) {
+					this.$refs.toast.error('积分有误')
+					return
+				}
+				let params = {
+					type: 1,
+					phone: this.vuex_phone,
+					goodsId: this.id,
+					addressId: this.address.id,
+					num: this.exChangeData.num
+				}
+				let res = await this.$api.pointgoods.exchange(params)
+				if (res.data.success) {
+					this.resetData()
+					this.init()
+					this.$refs.exchangeSuccess.showSuccess(this.detail.imgUrl)
+				}
+				console.log(res.data);
+			},
+			pufaPointChange(e) {
+				this.exChangeData.point = e.value
+			},
+			numChange(e) {
+				this.exChangeData.num = e.value
+				this.getMaxValue()
+			},
+			async init() {
+				await this.fetchUserData()
+				this.getMaxValue()
+				this.getAddress()
+				this.fetchGoodsDetail()
+				this.exchangeShow = true
+			},
+			
+			/**
+			 * 获取最大购买数量
+			 */
+			getMaxNum(){
+				// 是否限购
+				if (!this.detail.isLimit) {
+					//不限购,返回库存量
+					this.maxNum=this.detail.remain
+					return 
+				}
+				//限购
+				if (this.detail.remain > this.detail.limitBuy) {
+					this.maxNum=this.detail.limitBuy
+					return
+				}
+				this.maxNum=this.detail.remain
+			},
+			/**
+			 * 获取步进器的最大值
+			 */
+			getMaxValue() {
+				let userPoint = parseInt(this.userData.userPufaPoint)
+				let detailPoint = this.$digital.floatMul(parseInt(this.detail.point), this.exChangeData.num)
+				if (userPoint > detailPoint) {
+					this.maxValue = detailPoint
+				} else {
+					this.maxValue = userPoint
+				}
+			},
+			/**
+			 * 获取用户可用积分
+			 */
+			async fetchUserData() {
+				if (!this.vuex_phone) {
 					return
 				}
 				let params = {
-					id: this.vuex_userId
+					phone: this.vuex_phone
 				}
-				this.$api.loginUser.detail(params).then(res => {
-					this.userInfo = res.data.data
-				})
+				let res = await this.$api.loginUser.userHeatValueAndPufaPoint(params)
+				this.userData = res.data.data
 			},
 			/**
 			 * 获取用户地址
 			 */
-			getAddress() {
-				this.$api.address.list({
+			async getAddress() {
+				if (this.$isEmpty(this.vuex_userId)) {
+					return
+				}
+				let params = {
 					userId: this.vuex_userId
-				}).then(res => {
-					this.address = res.data.data.records[0];
-				})
+				}
+				let res = await this.$api.address.list(params)
+				this.address = res.data.data.records[0];
 			},
 			/**
 			 * 获取商品详情
 			 */
-			fetchGoodsDetail() {
+			async fetchGoodsDetail() {
 				let params = {
 					id: this.id
 				}
-				this.$api.pointgoods.list(params).then(res=>{
-					this.detail=res.data.data.records[0]
-				})
+				let res=await this.$api.pointgoods.list(params)
+				this.detail = res.data.data.records[0]
+				this.getMaxNum()
 			}
 		}
 	}
@@ -169,13 +300,17 @@
 		background-color: #FFFFFF;
 	}
 
+	.red {
+		color: #e72226;
+	}
+
 	.goods {
-		padding-bottom: 20rpx;
+		padding-bottom: 40rpx;
 		border-bottom: 1rpx solid #efefef;
 
 		.title {
 			padding-top: 20rpx;
-			margin-left: 20rpx;
+			margin: 0 20rpx;
 			font-size: 32rpx;
 			color: #363636;
 		}

+ 31 - 22
pages/shop/shop.vue

@@ -1,17 +1,16 @@
 <template>
 	<view :style="vuex_skin" style="width: 100vw;overflow: hidden;">
-		<u-navbar title-color="#fff" z-index="90" :border-bottom="false" :is-back="false" title="积分商城"
+		<u-navbar title-color="#fff" z-index="90" :border-bottom="false" :is-back="false" title="积分换礼"
 			:background="{'backgroundColor': vuex_theme.shopBg}"></u-navbar>
-
 		<mescroll-body ref="mescrollRef" @init="mescrollInit" :down="downOption" @down="downCallback" @up="upCallback">
 			<view class="bg-card">
 				<view class="info" style="display: flex;justify-content: space-between;">
 					<view class="flex" v-if="vuex_userId">
-						<image style="width: 90rpx;height: 90rpx;border-radius: 50%;" :src="userData.avatar">
+						<image style="width: 90rpx;height: 90rpx;border-radius: 50%;" :src="avatar">
 						</image>
 						<view class="center data">
 							<text style="color: #FFD7D9;">我的积分:</text>
-							<text class="text-bold text-xxl">{{userData.pufaPoint}}</text>
+							<text class="text-bold text-xxl">{{userData.userPufaPoint}}</text>
 						</view>
 					</view>
 					<view class="flex" v-else @click="showLogin">
@@ -23,13 +22,13 @@
 					</view>
 					<view class="center" style="margin-right: -30rpx;">
 						<view class="cu-btn round sm rule" @click="$jump('/pages/rule/point')">
-							积分规则
+							积分兑换规则
 						</view>
 					</view>
 				</view>
 			</view>
 			<view class="swiper">
-				<u-swiper :list="swiperList" border-radius="12" height="250"></u-swiper>
+				<u-swiper :list="swiperList" name="url" mode="rect" border-radius="12" height="250"></u-swiper>
 			</view>
 			<view class="recommend-info">
 				<view class="goods-list">
@@ -47,7 +46,7 @@
 								<text class="max">{{item.point}}积分</text>
 							</view>
 						</view>
-						<view class="bottom padding-top-20" >
+						<view class="bottom padding-top-20">
 							<button class="cu-btn round text-white bg-base"
 								style="width: 140upx;height: 50upx;">兑换</button>
 						</view>
@@ -65,12 +64,11 @@
 		mixins: [MescrollMixin],
 		data() {
 			return {
-				swiperList: [
-					'https://vote.guosen-fumao.cn/obsfile/3b23192e2b684e1e8d606790216d9d19-bff40cda56a61fb3151002945d87ad7.jpg'
-				],
+				swiperList: [],
 				downOption: {
 					auto: false
 				},
+				avatar: '',
 				userData: {},
 				list: []
 			}
@@ -78,31 +76,42 @@
 		onShow() {
 			this.init()
 		},
+		onLoad() {
+			this.fetchSwiperList()
+		},
 		methods: {
-			init(){
+			async fetchSwiperList() {
+				try{
+					let {
+						POINT_GOODS_SETTING
+					} = (await this.$api.platform.getPlatformParams({
+						keys: 'POINT_GOODS_SETTING'
+					})).data.data;
+					this.swiperList = JSON.parse(POINT_GOODS_SETTING).indexImageList
+				}catch(e){
+					console.log(e);
+				}
+			},
+			init() {
+				this.avatar = this.$cache.get('userInfo').avatar
 				this.fetchUserInfo()
 			},
 			fetchUserInfo() {
-				if (!this.vuex_userId) {
+				if (!this.vuex_phone) {
 					return
 				}
 				let params = {
-					id: this.vuex_userId
+					phone: this.vuex_phone
 				}
-				this.$api.loginUser.detail(params).then(res => {
-					if (this.$isNotEmpty(res.data.data)) {
-						this.userData = res.data.data
-						let userInfo = this.userData
-						userInfo.sessionKey = this.$cache.get('userInfo').sessionKey
-						this.$cache.put('userInfo', userInfo)
-						this.$u.vuex('vuex_phone', this.userData.phone)
-					}
+				this.$api.loginUser.userHeatValueAndPufaPoint(params).then(res => {
+					this.userData = res.data.data
 				})
 			},
 			downCallback() {
 				setTimeout(() => {
+					this.fetchSwiperList()
 					this.mescroll.resetUpScroll();
-				}, 1000)
+				}, 800)
 			},
 			upCallback(mescroll) {
 				try {

+ 1 - 1
pages/webview/auth_result.vue

@@ -34,7 +34,7 @@
 		},
 		methods: {
 			confirm(){
-				location.href = "weixin://dl/business/?t=X2CyIQDbgtm"
+				location.href = "weixin://dl/business/?t=EEIoZYi3ckf"
 			}
 		}
 	}

BIN
static/icon/divider.png


BIN
static/icon/empty.png


BIN
static/kd/EMS.png


BIN
static/kd/HHTT.png


BIN
static/kd/HTKY.png


BIN
static/kd/JD.png


BIN
static/kd/SF.png


BIN
static/kd/STO.png


BIN
static/kd/YD.png


BIN
static/kd/YTO.png


BIN
static/kd/YZPY.png


BIN
static/kd/ZTO.png


BIN
static/kd/kd.png


BIN
static/logo.png


BIN
static/mine/kefu.png


BIN
static/test/auth.jpg


BIN
static/test/avatar.png


BIN
static/test/bg.jpg


BIN
static/test/goods.png


BIN
static/test/jingcha.jpg


BIN
static/test/test.png


+ 5 - 3
uni_modules/mescroll-uni/components/mescroll-body/mescroll-body.vue

@@ -34,13 +34,15 @@
 			<!-- 上拉加载区域 (下拉刷新时不显示, 支付宝小程序子组件传参给子子组件仍报单项数据流的异常,暂时不通过mescroll-up组件实现)-->
 			<!-- <mescroll-up v-if="mescroll.optUp.use && !isDownLoading && upLoadType!==3" :option="mescroll.optUp" :type="upLoadType"></mescroll-up> -->
 			<view v-if="mescroll.optUp.use && !isDownLoading && upLoadType!==3" class="mescroll-upwarp" :style="{'background':mescroll.optUp.bgColor,'color':mescroll.optUp.textColor}">
+				<!-- uview -->
+				<u-loadmore status="loading" v-show="upLoadType===1" icon-type="flower" color="#909399" font-size="26" :load-text="{'loading': mescroll.optUp.textLoading}"/>
+				<u-loadmore status="nomore" v-show="upLoadType===2" color="#909399" font-size="26" :load-text="{'nomore': mescroll.optUp.textNoMore}"/>
 				<!-- 加载中 (此处不能用v-if,否则android小程序快速上拉可能会不断触发上拉回调) -->
-				<view v-show="upLoadType===1">
+				<!-- <view v-show="upLoadType===1">
 					<view class="upwarp-progress mescroll-rotate" :style="{'border-color':mescroll.optUp.textColor}"></view>
 					<view class="upwarp-tip">{{ mescroll.optUp.textLoading }}</view>
 				</view>
-				<!-- 无数据 -->
-				<view v-if="upLoadType===2" class="upwarp-nodata">{{ mescroll.optUp.textNoMore }}</view>
+				<view v-if="upLoadType===2" class="upwarp-nodata">{{ mescroll.optUp.textNoMore }}</view> -->
 			</view>
 		</view>
 		

+ 2 - 2
uni_modules/mescroll-uni/components/mescroll-diy/xinlang/mescroll-uni-option.js

@@ -19,7 +19,7 @@ const GlobalOption = {
 		},
 		empty: {
 			use: true, // 是否显示空布局
-			icon: "https://vote.guosen-fumao.cn/obsfile/2603aec6466f4b5fb7010df377b0c680-%E6%97%A0%E6%95%B0%E6%8D%AE.png" // 图标路径 (建议放入static目录, 如 /static/img/mescroll-empty.png )
+			icon: "/static/icon/empty.png" // 图标路径 (建议放入static目录, 如 /static/img/mescroll-empty.png )
 		}
 	},
 	// 国际化配置
@@ -35,7 +35,7 @@ const GlobalOption = {
 			},
 			up: {
 				textLoading: '加载中 ...', // 加载中的提示文本
-				textNoMore: '到底啦', // 没有更多数据的提示文本
+				textNoMore: '没有更多了', // 没有更多数据的提示文本
 				empty: {
 					tip: '暂无数据' // 空提示
 				}

+ 1 - 1
uni_modules/mescroll-uni/components/mescroll-empty/mescroll-empty.vue

@@ -77,7 +77,7 @@ export default {
 .mescroll-empty {
 	box-sizing: border-box;
 	width: 100%;
-	padding: 100rpx 50rpx;
+	padding: 200rpx 50rpx;
 	text-align: center;
 }
 

+ 4 - 4
uni_modules/mescroll-uni/components/mescroll-uni/mescroll-uni-option.js

@@ -20,7 +20,7 @@ const GlobalOption = {
 		},
 		empty: {
 			use: true, // 是否显示空布局
-			icon: "https://vote.guosen-fumao.cn/obsfile/2603aec6466f4b5fb7010df377b0c680-%E6%97%A0%E6%95%B0%E6%8D%AE.png" // 图标路径 (建议放入static目录, 如 /static/img/mescroll-empty.png )
+			icon: "/static/icon/empty.png" // 图标路径 (建议放入static目录, 如 /static/img/mescroll-empty.png )
 		}
 	},
 	// 国际化配置
@@ -30,13 +30,13 @@ const GlobalOption = {
 			down: {
 				textInOffset: '下拉刷新', // 下拉的距离在offset范围内的提示文本
 				textOutOffset: '释放更新', // 下拉的距离大于offset范围的提示文本
-				textLoading: '加载中 ...', // 加载中的提示文本
+				textLoading: '努力加载中', // 加载中的提示文本
 				textSuccess: '加载成功', // 加载成功的文本
 				textErr: '加载失败', // 加载失败的文本
 			},
 			up: {
-				textLoading: '加载中 ...', // 加载中的提示文本
-				textNoMore: '到底啦', // 没有更多数据的提示文本
+				textLoading: '努力加载中', // 加载中的提示文本
+				textNoMore: '没有更多了', // 没有更多数据的提示文本
 				empty: {
 					tip: '数据为空' // 空提示
 				}

+ 31 - 0
utils/mpi.js

@@ -15,6 +15,37 @@ mpi.wxLogin = () => {
 	})
 }
 
+mpi.chooseLocation = () => {
+	return new Promise((resolve, reject) => {
+		uni.chooseLocation({
+			success: function(res) {
+				resolve(res)
+			},
+			fail: function(err) {
+				reject(err)
+			}
+		});
+	})
+}
+
+mpi.photoToBase64 = () => {
+	uni.chooseImage({
+		count: 9,
+		success: res => {
+			uni.request({
+				url: res.tempFilePaths[0],
+				method: 'GET',
+				responseType: 'arraybuffer',
+				success: resp => {
+					let base64 = uni.arrayBufferToBase64(resp.data); //把arraybuffer转成base64
+					base64 = 'data:image/jpeg;base64,' + base64; //不加上这串字符,在页面无法显示
+					console.log(base64);
+				}
+			});
+		}
+	});
+}
+
 //选择图片 res.tempFilePaths[0]
 mpi.chooseImage = (count = 1, size = 2) => {
 	return new Promise((resolve, reject) => {

Bu fark içinde çok fazla dosya değişikliği olduğu için bazı dosyalar gösterilmiyor