lhl 3 years ago
parent
commit
0a24e36333

+ 12 - 1
api/public.js

@@ -58,6 +58,12 @@ export function getLogo() {
 	});
 }
 
+export function getApp() {
+	return request.get('apk', {}, {
+		noAuth: true
+	});
+}
+
 /**
  * 小程序用户登录
  * @param data object 小程序用户登陆信息
@@ -120,4 +126,9 @@ export function getSubscribe(){
 //发放积分
 export function advertisement(data) {
 	return request.post("advertisement",data,{noAuth: true});
-}
+}
+
+// 获取要下载的app
+// export function getApp() {
+// 	return request.get('apk')
+// }

+ 3 - 3
manifest.json

@@ -1,6 +1,6 @@
 {
-    "name" : "CRMEB",
-    "appid" : "__UNI__99FC347",
+    "name" : "环球优购",
+    "appid" : "__UNI__F8C6120",
     "description" : "",
     "versionName" : "1.0.4",
     "versionCode" : 127,
@@ -185,7 +185,7 @@
                 }
             }
         },
-        "title" : "加载中...",
+        "title" : "环球优购",
         "template" : "template.h5.html"
     }
 }

+ 13 - 1
pages.json

@@ -14,11 +14,23 @@
 			}
 		},
 		{
-			"path": "pages/index/bdzq",
+			"path": "pages/index/register",
 			"style": {
 				"navigationBarTitleText": "积分专区"
 			}
 		},
+		{
+			"path": "pages/index/bdzq",
+			"style": {
+				"navigationBarTitleText": "注册"
+			}
+		},
+		{
+			"path": "pages/index/down",
+			"style": {
+				"navigationBarTitleText": "下载"
+			}
+		},
 		{
 			"path": "pages/index/xfqzq",
 			"style": {

+ 2 - 1
pages/goods_details/index.vue

@@ -1172,7 +1172,8 @@
 					product_attr_unique: that.attr.productSelect !== undefined ? that.attr.productSelect.unique : "",
 					source: this.source,
 					product_type: 0,
-					spread_id: this.currSpid
+					spread_id: this.currSpid,
+					userConsumption:  that.storeInfo.is_consumption == 1  ?1:0
 				};
 				postCartAdd(q)
 					.then(function(res) {

+ 129 - 0
pages/index/down.vue

@@ -0,0 +1,129 @@
+<template>
+	<view class="content">
+		<div class="div">
+			<img class="img" src="../../static/img/hqyg.png" />
+			<!-- <a href="#" id="donwa" > -->
+			<div class="button" @click="goDown">Android版本下载</div>
+			<!-- </a> -->
+		</div>
+		<!-- <image src="../../static/img/live_weixin.png" alt="微信打开" style="width: 750rpx;"/> -->
+		<div class="weixin-tip" :style="{'display':iswx?'block':'none'}">
+			<p>
+				<img src="../../static/img/live_weixin.png" alt="微信打开" />
+			</p>
+		</div>
+	</view>
+</template>
+
+<script>
+	import {
+		getApp,
+		getconfig
+	} from "@/api/public";
+	export default {
+		data() {
+			return {
+				appurl: '',
+				iswx: false,
+			}
+		},
+		onLoad() {
+			this.getApp()
+			this.iswx = this.is_weixin()
+			console.log(this.iswx)
+		},
+		onShow() {
+
+		},
+		onReachBottom() {
+
+		},
+		onReady() {
+
+		},
+		methods: {
+			getApp() {
+				getApp().then(res => {
+					console.log(res)
+					this.appurl = res.data.apk
+				})
+			},
+			goDown() {
+				window.location.href = this.appurl
+			},
+			is_weixin() {
+				var ua = navigator.userAgent.toLowerCase();
+				if (ua.match(/MicroMessenger/i) == "micromessenger") {
+					return true;
+				} else {
+					return false;
+				}
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.div {
+		width: 100%;
+		height: 100%;
+		position: relative;
+	}
+
+	.button {
+		margin-left: 10%;
+		position: fixed;
+		bottom: 120rpx;
+		width: 80%;
+		text-align: center;
+		z-index: 999;
+		height: 140rpx;
+		font-size: 32rpx;
+		line-height: 140rpx;
+		letter-spacing: 5rpx;
+		background-color: #e1004b;
+		border-radius: 5rpx;
+		color: white;
+
+	}
+
+	.img {
+		position: absolute;
+		width: 300rpx;
+		top: 50rpx;
+		left: 0;
+		right: 0;
+		margin: auto;
+	}
+
+	img {
+		// max-width: 100%;
+		width: 300rpx;
+		height: auto;
+	}
+
+	.weixin-tip {
+		display: none;
+		position: fixed;
+		left: 0;
+		top: 0;
+		bottom: 0;
+		background: rgba(0, 0, 0, 0.8);
+		filter: alpha(opacity=80);
+		height: 100%;
+		width: 100%;
+		z-index: 100;
+	}
+
+	.weixin-tip p {
+		text-align: center;
+		margin-top: 10%;
+		padding: 0 5%;
+	}
+
+	* {
+		padding: 0;
+		margin: 0;
+		box-sizing: border-box
+	}
+</style>

+ 2 - 1
pages/index/index.vue

@@ -538,9 +538,10 @@
 			},
 			//观看广告领奖
 			openGg() {
+				let that = this
 				getUserInfo().then(res => {
 					that.userInfo = res.data;
-					this.$dsbridge.call("fnAds.onShowRewardVideoAD", {}, function(result) {
+					that.$dsbridge.call("fnAds.onShowRewardVideoAD", {}, function(result) {
 						let res = JSON.parse(result)
 						if (res.event == 'onReward') {	
 							advertisement({

+ 1219 - 0
pages/index/register.vue

@@ -0,0 +1,1219 @@
+<template>
+	<div :style="viewColor">
+		<div class="register absolute" v-if="!auth_token">
+			<div class="shading">
+				<div class="pictrue acea-row row-center-wrapper">
+					<image :src="login_logo" v-if="login_logo" />
+				</div>
+			</div>
+			<div class="whiteBg" v-if="formItem === 1">
+				<!-- <div class="title acea-row row-center-wrapper">
+				<div class="item" :class="current === index ? 'on' : ''" v-for="(item, index) in navList" @click="navTap(index)" :key="index">
+					{{ item }}
+				</div>
+			</div> -->
+				<div class="list" :hidden="current !== 0">
+					<form @submit.prevent="submit">
+						<div class="item">
+							<div class="acea-row row-middle">
+								<image src="/static/images/phone_1.png"></image>
+								<input type="text" placeholder="输入手机号码" placeholder-class="placeholder"
+									v-model="account" required />
+							</div>
+						</div>
+						<div class="item">
+							<div class="acea-row row-middle">
+								<image src="/static/images/code_2.png"></image>
+								<input type="password" placeholder="填写登录密码" placeholder-class="placeholder"
+									v-model="password" required />
+							</div>
+						</div>
+					</form>
+					<navigator class="forgetPwd" hover-class="none" url="/pages/users/retrievePassword/index">
+						忘记密码
+					</navigator>
+				</div>
+				<div class="list" :hidden="current !== 1">
+					<div class="item">
+						<div class="acea-row row-middle">
+							<image src="/static/images/phone_1.png"></image>
+							<input type="text" placeholder="输入手机号码" placeholder-class="placeholder" v-model="account" />
+						</div>
+					</div>
+					<div class="item">
+						<div class="acea-row row-middle">
+							<image src="/static/images/code_2.png"></image>
+							<input type="text" placeholder="填写验证码" placeholder-class="placeholder" class="codeIput"
+								v-model="captcha" />
+							<button v-debounce class="code" :disabled="disabled" :class="disabled === true ? 'on' : ''"
+								@click="code">
+								{{ text }}
+							</button>
+						</div>
+					</div>
+					<div class="item" v-if="isShowCode">
+						<div class="acea-row row-middle">
+							<image src="/static/images/code_2.png"></image>
+							<input type="text" placeholder="填写验证码" placeholder-class="placeholder" class="codeIput"
+								v-model="codeVal" />
+							<div class="code" @click="">
+								<image class="code-img" style="width: 100%;height: 100%;" :src="codeUrl" />
+							</div>
+						</div>
+					</div>
+				</div>
+				<div class="protocol acea-row row-between-wrapper">
+					<checkbox-group class="checkgroup" @change='isAgree=!isAgree'>
+						<checkbox class="checkbox" :checked="isAgree ? true : false" />
+						<text class="protocol_text">我已同意<text @click="userAgree" class="font_pro">《用户协议》</text>与<text
+								@click="userPrivacyAgree" class="font_pro">《隐私政策》</text></text>
+					</checkbox-group>
+				</div>
+				<div class="logon" v-debounce @click="loginMobile" :hidden="current !== 1">登录</div>
+				<div class="logon" v-debounce @click="submit" :hidden="current === 1">登录</div>
+				<div class="tip">
+					没有账号?
+					<span @click="formItem = 2" class="font-color-red">立即注册</span>
+				</div>
+
+				<!-- #ifdef MP -->
+				<view class="appLogin">
+					<view class="hds">
+						<span class="line"></span>
+						<p>其他方式登录</p>
+						<span class="line"></span>
+					</view>
+					<view class="btn-wrapper">
+						<button form-type="submit" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">
+							<view class="btn wx">
+								<span class="iconfont icon-s-weixindenglu1"></span>
+							</view>
+						</button>
+					</view>
+				</view>
+				<!-- #endif -->
+				<!-- #ifdef APP-PLUS -->
+				<view class="appLogin" v-if="!appLoginStatus && !appleLoginStatus">
+					<view class="hds">
+						<span class="line"></span>
+						<p>其他方式登录</p>
+						<span class="line"></span>
+					</view>
+					<view class="btn-wrapper">
+						<view class="btn wx" @click="wxLogin">
+							<span class="iconfont icon-s-weixindenglu1"></span>
+						</view>
+						<view class="btn wx btn-apple" @click="appleLogin" v-if="appleShow">
+							<span class="iconfont icon-s-pingguo"></span>
+						</view>
+					</view>
+				</view>
+				<!-- #endif -->
+			</div>
+			<div class="whiteBg" v-else>
+				<div class="title">注册账号</div>
+				<div class="list">
+					<div class="item">
+						<div class="acea-row row-middle">
+							<image src="/static/images/phone_1.png"></image>
+							<input type="text" placeholder="输入手机号码" placeholder-class="placeholder" v-model="account" />
+						</div>
+					</div>
+					<div class="item">
+						<div class="acea-row row-middle">
+							<image src="/static/images/code_2.png"></image>
+							<input type="text" placeholder="填写验证码" placeholder-class="placeholder" class="codeIput"
+								v-model="captcha" />
+							<button class="code" :disabled="disabled" :class="disabled === true ? 'on' : ''"
+								@click="code">
+								{{ text }}
+							</button>
+						</div>
+					</div>
+					<div class="item">
+						<div class="acea-row row-middle">
+							<image src="/static/images/code_1.png"></image>
+							<input type="password" placeholder="填写您的登录密码" placeholder-class="placeholder"
+								v-model="password" />
+						</div>
+					</div>
+					<div class="item" v-if="isShowCode">
+						<div class="acea-row row-middle">
+							<image src="/static/images/code_2.png"></image>
+							<input type="text" placeholder="填写验证码" placeholder-class="placeholder" class="codeIput"
+								v-model="codeVal" />
+							<div class="code" @click="">
+								<image class="code-img" style="width: 100%;height: 100%;" :src="codeUrl" />
+							</div>
+						</div>
+					</div>
+					<div class="item">
+						<div class="acea-row row-middle">
+							<image src="/static/images/4-001.png"></image>
+							<input type="text" placeholder="暂无推荐人" placeholder-class="placeholder" v-model="spread"
+								disabled />
+						</div>
+					</div>
+				</div>
+				<div class="protocol acea-row row-between-wrapper">
+					<checkbox-group class="checkgroup" @change='isAgree=!isAgree'>
+						<checkbox class="checkbox" :checked="isAgree ? true : false" />
+						<text class="protocol_text">我已同意<text @click="userAgree" class="font_pro">《用户协议》</text>与<text
+								@click="userPrivacyAgree" class="font_pro">《隐私政策》</text></text>
+					</checkbox-group>
+				</div>
+				<div class="logon" @click="register">注册</div>
+				<div class="tip" style="font-size: 32rpx;font-weight: bold;">
+					<!-- 已有账号? -->
+					<span @click="goDown" class="font-color-red">立即下载APP</span>
+				</div>
+				<!-- #ifdef APP-PLUS -->
+				<view class="appLogin" v-if="!appLoginStatus && !appleLoginStatus">
+					<view class="hds">
+						<span class="line"></span>
+						<p>其他方式登录</p>
+						<span class="line"></span>
+					</view>
+					<view class="btn-wrapper">
+						<view class="btn wx" @click="wxLogin">
+							<span class="iconfont icon-s-weixindenglu1"></span>
+						</view>
+						<view class="btn wx btn-apple" @click="appleLogin" v-if="appleShow">
+							<span class="iconfont icon-s-pingguo"></span>
+						</view>
+					</view>
+				</view>
+				<!-- #endif -->
+			</div>
+			<div class="bottom"></div>
+			<view class="settlementAgreement" v-if="showAgreement">
+				<view class="setAgCount">
+					<i class="icon iconfont icon-cha" @click="showAgreement = false"></i>
+					<div class="title">用户协议与隐私政策</div>
+					<view class="content">
+						<jyf-parser :html="agreement" ref="article" :tag-style="tagStyle"></jyf-parser>
+					</view>
+				</view>
+			</view>
+		</div>
+		<form report-submit='true' v-if="auth_token">
+			<view class="ChangePassword">
+				<view class="list">
+					<view class="item">
+						<input type='number' placeholder='填写手机号码' placeholder-class='placeholder'
+							v-model="account"></input>
+					</view>
+					<view class="item acea-row row-between-wrapper">
+						<input type='number' placeholder='填写验证码' placeholder-class='placeholder' class="codeIput"
+							v-model="captcha"></input>
+						<button class="code" :class="disabled === true ? 'on' : ''" :disabled='disabled' @click="code">
+							{{ text }}
+						</button>
+					</view>
+					<view class="item">
+						<input type='password' placeholder='填写登录密码' placeholder-class='placeholder'
+							v-model="password"></input>
+					</view>
+					<view class="protocol acea-row row-between-wrapper">
+						<checkbox-group class="checkgroup" @change='isAgree=!isAgree'>
+							<checkbox class="checkbox" :checked="isAgree ? true : false" />
+							<text class="protocol_text">我已同意<text @click="userAgree"
+									class="font_pro">《用户协议》</text>与<text @click="userPrivacyAgree"
+									class="font_pro">《隐私政策》</text></text>
+						</checkbox-group>
+					</view>
+				</view>
+				<button form-type="submit" @click="register" class="confirmBnt">确认绑定</button>
+				<button form-type="submit" @click="auth_token = ''" class="confirmBnt back">返回</button>
+			</view>
+		</form>
+	</div>
+</template>
+<script>
+	// +----------------------------------------------------------------------
+	// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
+	// +----------------------------------------------------------------------
+	// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
+	// +----------------------------------------------------------------------
+	// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
+	// +----------------------------------------------------------------------
+	// | Author: CRMEB Team <admin@crmeb.com>
+	// +----------------------------------------------------------------------
+	import dayjs from "@/plugin/dayjs/dayjs.min.js";
+	import sendVerifyCode from "@/mixins/SendVerifyCode";
+	import {
+		loginH5,
+		loginMobile,
+		registerVerify,
+		register,
+		getCodeApi,
+		getUserInfo,
+		getCaptcha,
+		getAgreementApi,
+		appleLogin,
+		loginMpPhone
+	} from "@/api/user";
+	// #ifdef APP-PLUS
+	import {
+		wechatAppAuth,
+		appleAppAuth
+	} from '@/api/api.js'
+	// #endif
+	import attrs, {
+		required,
+		alpha_num,
+		chs_phone
+	} from "@/utils/validate";
+	import {
+		validatorDefaultCatch
+	} from "@/utils/dialog";
+	import {
+		getLogo,
+		getconfig
+	} from "@/api/public";
+	// import cookie from "@/utils/store/cookie";
+	import {
+		VUE_APP_API_URL,
+		configMap
+	} from "@/utils";
+	import parser from "@/components/jyf-parser/jyf-parser";
+	import {
+		commonAuth
+	} from '@/api/public';
+	import {
+		mapGetters
+	} from "vuex";
+
+	const BACK_URL = "login_back_url";
+
+	export default {
+		name: "Login",
+		mixins: [sendVerifyCode],
+		components: {
+			"jyf-parser": parser
+		},
+		data: function() {
+			return {
+				spread: '',
+				navList: ["账号登录", "快速登录"],
+				current: 0,
+				account: "",
+				password: "",
+				captcha: "",
+				formItem: 2,
+				type: "login",
+				keyCode: "",
+				codeUrl: "",
+				codeVal: "",
+				isShowCode: false,
+				showAgreement: false,
+				tagStyle: {
+					img: 'width:100%;display:block;'
+				},
+				isAgree: false,
+				agreement: '',
+				appLoginStatus: false, // 微信登录强制绑定手机号码状态
+				appUserInfo: null, // 微信登录保存的用户信息
+				appleLoginStatus: false, // 苹果登录强制绑定手机号码状态
+				appleUserInfo: null,
+				appleShow: false, // 苹果登录版本必须要求ios13以上的
+				keyLock: true,
+				auth_token: '',
+				codeVal: ''
+			};
+		},
+		computed: configMap(['login_logo'], mapGetters(['viewColor'])),
+		watch: {
+			formItem: function(nval, oVal) {
+				if (nval == 1) {
+					this.type = 'login'
+				} else {
+					this.type = 'register'
+				}
+			}
+		},
+		onLoad(opt) {
+			if (opt.spread) {
+				this.spread = opt.spread
+			}
+			let self = this
+			uni.getSystemInfo({
+				success: function(res) {
+					if (res.platform.toLowerCase() == 'ios' && self.getSystem(res.system) >= 13) {
+						self.appleShow = true
+					}
+				}
+			});
+		},
+		mounted: function() {
+
+		},
+		onReady() {
+			let that = this
+			// #ifdef MP
+			wx.login({
+				success(res) {
+					if (res.code) {
+						that.codeVal = res.code
+					} else {
+						console.log('登录失败!' + res.errMsg)
+					}
+				}
+			})
+			// #endif
+		},
+		methods: {
+			goDown() {
+				uni.navigateTo({
+					url: '/pages/index/down'
+				})
+			},
+			// #ifdef MP
+			getPhoneNumber(e) {
+				let that = this;
+				loginMpPhone({
+						iv: e.detail.iv,
+						encryptedData: e.detail.encryptedData,
+						code: that.codeVal,
+						auth_token: uni.getStorageSync('auth_token'),
+					}).then(({
+						data
+					}) => {
+						const backUrl = that.$Cache.get(BACK_URL) || "/pages/index/index";
+						that.$Cache.clear(BACK_URL);
+						that.$store.commit("LOGIN", {
+							'token': data.token,
+							'time': data.exp
+						});
+						that.$store.commit("SETUID", data.user.uid);
+						that.$store.commit('UPDATE_USERINFO', data.user);
+
+						let method
+						let indexPat = ['/pages/index/index', '/pages/order_addcart/order_addcart',
+							'/pages/goods_cate/goods_cate',
+							'/pages/user/index', '/pages/plant_grass/index'
+						]
+						if (indexPat.includes(this.getPath(backUrl))) {
+							method = 'switchTab'
+						} else {
+							method = 'navigateTo'
+						}
+						if (this.getPath(backUrl) === '/pages/users/login/index') {
+							uni.switchTab({
+								url: '/pages/index/index'
+							});
+							return
+						}
+						uni[method]({
+							url: backUrl
+						});
+					})
+					.catch(res => {
+						that.$util.Tips({
+							title: res
+						});
+					});
+			},
+			// #endif
+			userAgree() {
+				uni.navigateTo({
+					url: '/pages/users/user_about/index?from=sys_user_agree'
+				})
+			},
+			userPrivacyAgree() {
+				uni.navigateTo({
+					url: '/pages/users/user_about/index?from=sys_userr_privacy'
+				})
+			},
+			getSystem(system) {
+				if (system.indexOf('iOS') === -1) {
+					return system
+				} else {
+					let str = system.split(' ')[1]
+					if (str.indexOf('.')) {
+						return Number(str.split('.')[0])
+					} else {
+						return Number(str)
+					}
+				}
+
+			},
+			// 苹果登录
+			appleLogin() {
+				let self = this
+				this.account = ''
+				this.captcha = ''
+				uni.showLoading({
+					title: '登录中'
+				})
+				uni.login({
+					provider: 'apple',
+					timeout: 10000,
+					success(loginRes) {
+						uni.getUserInfo({
+							provider: 'apple',
+							success: function(infoRes) {
+								self.appleUserInfo = infoRes.userInfo
+								self.appleLoginApi()
+							},
+							fail() {
+								uni.showToast({
+									title: '获取用户信息失败',
+									icon: 'none',
+									duration: 2000
+								})
+							},
+							complete() {
+								uni.hideLoading()
+							}
+						});
+					},
+					fail(error) {
+						uni.showToast({
+							title: '获取用户信息失败',
+							icon: 'none',
+							duration: 2000
+						})
+						console.log(error)
+					}
+				})
+			},
+			appleLoginApi() {
+				let that = this
+				commonAuth({
+					auth: {
+						type: 'apple',
+						auth: {
+							userInfo: that.appleUserInfo,
+							openId: that.appleUserInfo.openId,
+							nickname: (that.appleUserInfo.fullName.familyName || '') + (that.appleUserInfo.fullName
+								.giveName || ''),
+						}
+					}
+				}).then(res => {
+					const data = res.data;
+					if (res.data.status == 200) {
+						const backUrl = that.$Cache.get(BACK_URL) || "/pages/index/index";
+						that.$Cache.clear(BACK_URL);
+						that.$store.commit("LOGIN", {
+							'token': data.result.token,
+							'time': data.result.exp
+						});
+						that.$store.commit("SETUID", data.result.user.uid);
+						that.$store.commit('UPDATE_USERINFO', data.result.user);
+
+						let method
+						let indexPat = ['/pages/index/index', '/pages/order_addcart/order_addcart',
+							'/pages/goods_cate/goods_cate',
+							'/pages/user/index', '/pages/plant_grass/index'
+						]
+						if (indexPat.includes(this.getPath(backUrl))) {
+							method = 'switchTab'
+						} else {
+							method = 'navigateTo'
+						}
+						if (this.getPath(backUrl) === '/pages/users/login/index') {
+							uni.switchTab({
+								url: '/pages/index/index'
+							});
+							return
+						}
+						uni[method]({
+							url: backUrl
+						});
+					} else {
+						uni.hideLoading();
+						that.auth_token = res.data.result.key;
+					}
+				}).catch(res => {
+					uni.hideLoading();
+					uni.showToast({
+						title: res.message || res,
+						icon: 'none',
+						duration: 2000
+					});
+				});
+			},
+			// App微信登录
+			wxLogin() {
+				let self = this
+				this.account = ''
+				this.captcha = ''
+				uni.showLoading({
+					title: '登录中'
+				})
+				uni.login({
+					provider: 'weixin',
+					// onlyAuthorize: true,
+					success: function(loginRes) {
+						self.appUserInfo = loginRes
+						self.wxLoginApi()
+					},
+					fail(error) {
+						uni.showToast({
+							title: '登录失败',
+							icon: 'none',
+							duration: 2000
+						})
+					}
+				});
+			},
+			getPath(url) {
+				if (url.indexOf("?") != -1) {
+					url = url.split("?")[0];
+					console.log(url);
+				}
+				return url
+			},
+			wxLoginApi() {
+				const that = this
+				commonAuth({
+					auth: {
+						type: 'app_wechat',
+						auth: {
+							code: that.appUserInfo.authResult.access_token,
+							openid: that.appUserInfo.authResult.openid,
+							phone: this.account,
+						}
+					}
+				}).then(res => {
+					const data = res.data;
+					if (res.data.status == 200) {
+						const backUrl = that.$Cache.get(BACK_URL) || "/pages/index/index";
+						that.$Cache.clear(BACK_URL);
+						that.$store.commit("LOGIN", {
+							'token': data.result.token,
+							'time': data.result.exp
+						});
+						that.$store.commit("SETUID", data.result.user.uid);
+						that.$store.commit('UPDATE_USERINFO', data.result.user);
+						let method
+						let indexPat = ['/pages/index/index', '/pages/order_addcart/order_addcart',
+							'/pages/goods_cate/goods_cate',
+							'/pages/user/index', '/pages/plant_grass/index'
+						]
+						if (indexPat.includes(this.getPath(backUrl))) {
+							method = 'switchTab'
+						} else {
+							method = 'navigateTo'
+						}
+						if (this.getPath(backUrl) === '/pages/users/login/index') {
+							uni.switchTab({
+								url: '/pages/index/index'
+							});
+							return
+						}
+						uni[method]({
+							url: backUrl
+						});
+					} else {
+						that.auth_token = res.data.result.key;
+						that.bindStatus = true;
+					}
+					uni.hideLoading();
+				}).catch(res => {
+					uni.hideLoading();
+					uni.showToast({
+						title: res.message || res,
+						icon: 'none',
+						duration: 2000
+					});
+				});
+			},
+			getAgreement() {
+				let that = this
+				getAgreementApi('sys_user_agree').then(res => {
+					that.agreement = res.data.sys_user_agree
+				})
+			},
+			getCode() {
+				let that = this
+				getCodeApi()
+					.then(res => {
+						that.keyCode = res.data.key;
+					})
+					.catch(res => {
+						that.$util.Tips({
+							title: res
+						});
+					});
+			},
+			async loginMobile() {
+				let that = this;
+				if (!that.account) return that.$util.Tips({
+					title: '请输入手机号码'
+				});
+				if (!/^1(3|4|5|7|8|9|6)\d{9}$/i.test(that.account)) return that.$util.Tips({
+					title: '请输入正确的手机号码'
+				});
+				if (!that.captcha) return that.$util.Tips({
+					title: '请输入验证码'
+				});
+				if (!/^[\w\d]+$/i.test(that.captcha)) return that.$util.Tips({
+					title: '请输入正确的验证码'
+				});
+				if (!that.isAgree) return that.$util.Tips({
+					title: '请勾选用户协议与隐私政策'
+				});
+
+				loginMobile({
+						auth_token: uni.getStorageSync('auth_token'),
+						phone: that.account,
+						sms_code: that.captcha,
+						spread: that.$Cache.get("spread"),
+						// #ifdef APP-PLUS
+						user_type: 'app',
+						// #endif
+						// #ifdef H5
+						user_type: 'h5',
+						// #endif
+					})
+					.then(({
+						data
+					}) => {
+						const backUrl = that.$Cache.get(BACK_URL) || "/pages/index/index";
+						that.$Cache.clear(BACK_URL);
+						that.$store.commit("LOGIN", {
+							'token': data.token,
+							'time': data.exp
+						});
+						that.$store.commit("SETUID", data.user.uid);
+						that.$store.commit('UPDATE_USERINFO', data.user);
+
+						let method
+						let indexPat = ['/pages/index/index', '/pages/order_addcart/order_addcart',
+							'/pages/goods_cate/goods_cate',
+							'/pages/user/index'
+						]
+						if (indexPat.includes(this.getPath(backUrl))) {
+							method = 'switchTab'
+						} else {
+							method = 'navigateTo'
+						}
+						if (this.getPath(backUrl) === '/pages/users/login/index') {
+							uni.switchTab({
+								url: '/pages/index/index'
+							});
+							return
+						}
+						uni[method]({
+							url: backUrl
+						});
+					})
+					.catch(res => {
+						that.$util.Tips({
+							title: res
+						});
+					});
+			},
+			async register() {
+				let that = this;
+				if (!that.account) return that.$util.Tips({
+					title: '请输入手机号码'
+				});
+				if (!/^1(3|4|5|7|8|9|6)\d{9}$/i.test(that.account)) return that.$util.Tips({
+					title: '请输入正确的手机号码'
+				});
+				if (!that.captcha) return that.$util.Tips({
+					title: '请输入验证码'
+				});
+				if (!/^[\w\d]+$/i.test(that.captcha)) return that.$util.Tips({
+					title: '请输入正确的验证码'
+				});
+				if (!that.password) return that.$util.Tips({
+					title: '请输入密码'
+				});
+				// if (!/^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,16}$/i.test(that.password)) return that.$util.Tips({
+				// 	title: '请输入6-16位字母加数字组合'
+				// });
+				if (!that.isAgree) return that.$util.Tips({
+					title: '请勾选用户协议与隐私政策'
+				});
+				register({
+						auth_token: this.auth_token || uni.getStorageSync('auth_token'),
+						phone: that.account,
+						sms_code: that.captcha,
+						pwd: that.password,
+						spread: that.spread,
+						// #ifdef APP-PLUS
+						user_type: 'app',
+						// #endif
+						// #ifdef H5
+						user_type: 'h5',
+						// #endif
+					})
+					.then(res => {
+						// const backUrl = that.$Cache.get(BACK_URL) || "/pages/index/index";
+						// that.$Cache.clear(BACK_URL);
+						// that.$store.commit("LOGIN", {
+						// 	'token': res.data.token,
+						// 	'time': res.data.exp
+						// });
+						// that.$store.commit("SETUID", res.data.user.uid);
+						// that.$store.commit('UPDATE_USERINFO', res.data.user);
+						that.$util.Tips({
+							title: "注册成功"
+						});
+					})
+					.catch(res => {
+						that.$util.Tips({
+							title: res
+						});
+					});
+			},
+			async code() {
+				let that = this;
+				if (!that.account) return that.$util.Tips({
+					title: '请输入手机号码'
+				});
+				if (!/^1(3|4|5|7|8|9|6)\d{9}$/i.test(that.account)) return that.$util.Tips({
+					title: '请输入正确的手机号码'
+				});
+				// if (that.formItem == 2) that.type = "register";
+				await registerVerify({
+						phone: that.account,
+						type: 'login',
+						key: that.keyCode,
+						code: that.codeVal
+					})
+					.then(res => {
+						that.$util.Tips({
+							title: res.message
+						});
+						that.sendCode();
+					})
+					.catch(res => {
+						that.getcaptcha();
+						that.$util.Tips({
+							title: res
+						});
+					});
+			},
+			getcaptcha() {
+				let that = this
+				getCaptcha().then(data => {
+					// that.codeUrl = `${VUE_APP_API_URL}/sms_captcha?key=${that.keyCode}`;
+					that.codeUrl = data.data.captcha;
+				})
+				that.isShowCode = true;
+			},
+			navTap: function(index) {
+				this.current = index;
+			},
+			getPath(url) {
+				if (url.indexOf("?") != -1) {
+					url = url.split("?")[0];
+				}
+				return url
+			},
+			async submit() {
+				let that = this;
+				if (!that.account) return that.$util.Tips({
+					title: '请输入账号'
+				});
+				if (!/^[\w\d]{5,16}$/i.test(that.account)) return that.$util.Tips({
+					title: '请输入正确的账号'
+				});
+				if (!that.password) return that.$util.Tips({
+					title: '请输入密码'
+				});
+				if (!that.isAgree) return that.$util.Tips({
+					title: '请勾选用户协议与隐私政策'
+				});
+				loginH5({
+						auth_token: uni.getStorageSync('auth_token'),
+						account: that.account,
+						password: that.password,
+						spread: that.$Cache.get("spread")
+					})
+					.then(({
+						data
+					}) => {
+						const backUrl = that.$Cache.get(BACK_URL) || "/pages/index/index";
+						that.$Cache.clear(BACK_URL);
+						that.$store.commit("LOGIN", {
+							'token': data.token,
+							'time': data.exp
+						});
+						that.$store.commit("SETUID", data.user.uid);
+						that.$store.commit('UPDATE_USERINFO', data.user);
+
+						let method
+						let indexPat = ['/pages/index/index', '/pages/order_addcart/order_addcart',
+							'/pages/goods_cate/goods_cate',
+							'/pages/user/index'
+						]
+						if (indexPat.includes(this.getPath(backUrl))) {
+							method = 'switchTab'
+						} else {
+							method = 'navigateTo'
+						}
+						if (this.getPath(backUrl) === '/pages/users/login/index') {
+							uni.switchTab({
+								url: '/pages/index/index'
+							});
+							return
+						}
+						uni[method]({
+							url: backUrl
+						});
+					})
+					.catch(e => {
+						that.$util.Tips({
+							title: e
+						});
+					});
+			}
+		}
+	};
+</script>
+<style lang="scss">
+	page {
+		background-color: #fff !important;
+	}
+
+	/deep/uni-checkbox .uni-checkbox-input {
+		border-radius: 100%;
+	}
+
+	.ChangePassword .phone {
+		font-size: 32rpx;
+		font-weight: bold;
+		text-align: center;
+		margin-top: 55rpx;
+	}
+
+	.ChangePassword .list {
+		width: 580rpx;
+		margin: 53rpx auto 0 auto;
+	}
+
+	.ChangePassword .list .item {
+		width: 100%;
+		height: 110rpx;
+		border-bottom: 2rpx solid #f0f0f0;
+	}
+
+	.ChangePassword .list .item input {
+		width: 100%;
+		height: 100%;
+		font-size: 32rpx;
+	}
+
+	.ChangePassword .list .item .placeholder {
+		color: #b9b9bc;
+	}
+
+	.ChangePassword .list .item input.codeIput {
+		width: 240rpx;
+
+	}
+
+	/deep/.uni-input-wrapper,
+	/deep/.uni-input-input {
+		// width: 240rpx;
+	}
+
+	.ChangePassword .list .item .code {
+		font-size: 32rpx;
+		background-color: #fff;
+		color: var(--view-theme);
+	}
+
+	.ChangePassword .list .item .code.on {
+		color: #b9b9bc;
+	}
+
+	.ChangePassword .confirmBnt {
+		font-size: 32rpx;
+		width: 580rpx;
+		height: 90rpx;
+		border-radius: 45rpx;
+		color: #fff;
+		margin: 92rpx auto 0 auto;
+		text-align: center;
+		line-height: 90rpx;
+		background-color: var(--view-theme);
+	}
+
+	.ChangePassword .confirmBnt.back {
+		background-color: #FFFFFF;
+		border: 1px solid var(--view-theme);
+		color: var(--view-theme);
+		margin-top: 30rpx;
+	}
+
+	.getPhoneBtn {
+		font-size: 32rpx;
+		width: 580rpx;
+		height: 90rpx;
+		border-radius: 45rpx;
+		border: 1rpx solid #3CB625;
+		color: #3CB625;
+		margin: 40rpx auto 0 auto;
+		text-align: center;
+		line-height: 90rpx;
+
+		.iconfont {
+			font-size: 32rpx;
+			margin-right: 12rpx;
+		}
+	}
+
+	.code image {
+		width: 100%;
+		height: 100%;
+	}
+
+	.acea-row.row-middle {
+		input {
+			margin-left: 20rpx;
+		}
+	}
+
+	.settlementAgreement {
+		width: 100%;
+		height: 100%;
+		position: fixed;
+		top: 0;
+		left: 0;
+		background: rgba(0, 0, 0, .5);
+		z-index: 10;
+	}
+
+	.protocol_text {
+		color: #999;
+		font-size: 24rpx;
+	}
+
+	.settlementAgreement .setAgCount {
+		background: #fff;
+		width: 656rpx;
+		height: 458px;
+		position: absolute;
+		top: 50%;
+		left: 50%;
+		border-radius: 12rpx;
+		-webkit-border-radius: 12rpx;
+		padding: 52rpx;
+		-webkit-transform: translate(-50%, -50%);
+		-moz-transform: translate(-50%, -50%);
+		transform: translate(-50%, -50%);
+		overflow: hidden;
+
+		.content {
+			height: 900rpx;
+			overflow-y: scroll;
+
+			/deep/ p {
+				font-size: 13px;
+				line-height: 22px;
+			}
+
+			/deep/ img {
+				max-width: 100%;
+			}
+		}
+	}
+
+	.settlementAgreement .setAgCount .icon {
+		font-size: 42rpx;
+		color: #b4b1b4;
+		position: absolute;
+		top: 15rpx;
+		right: 15rpx;
+
+	}
+
+	.settlementAgreement .setAgCount .title {
+		color: #333;
+		font-size: 32rpx;
+		text-align: center;
+		font-weight: bold;
+	}
+
+	.settlementAgreement .setAgCount .content {
+		margin-top: 32rpx;
+		color: #333;
+		font-size: 26rpx;
+		line-height: 22px;
+		text-align: justify;
+		text-justify: distribute-all-lines;
+		height: 756rpx;
+		overflow-y: scroll;
+	}
+
+	.protocol {
+		margin-top: 30rpx;
+	}
+
+	.protocol_text {
+		.font_pro {
+			color: var(--view-theme);
+		}
+	}
+
+	.appLogin {
+		.hds {
+			display: flex;
+			justify-content: center;
+			align-items: center;
+			font-size: 24rpx;
+			color: #B4B4B4;
+
+			.line {
+				width: 68rpx;
+				height: 1rpx;
+				background: #CCCCCC;
+			}
+
+			p {
+				margin: 0 20rpx;
+			}
+		}
+
+		.btn-wrapper {
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			margin-top: 30rpx;
+
+			.btn {
+				display: flex;
+				align-items: center;
+				justify-content: center;
+				width: 68rpx;
+				height: 68rpx;
+				border-radius: 50%;
+			}
+
+			.apple-btn {
+				display: flex;
+				align-items: center;
+				justify-content: center;
+				width: 246rpx;
+				height: 66rpx;
+				margin-left: 10rpx;
+				background: #EAEAEA;
+				border-radius: 34rpx;
+				font-size: 24rpx;
+
+				.icon-s-pingguo {
+					color: #333;
+					margin-right: 10rpx;
+					font-size: 34rpx;
+				}
+			}
+
+			.iconfont {
+				font-size: 40rpx;
+				color: #fff;
+			}
+
+			.wx {
+				margin-right: 30rpx;
+				background-color: #61C64F;
+
+				&.btn-apple {
+					margin-right: 0;
+					background-color: #333;
+				}
+			}
+
+			.mima {
+				background-color: #28B3E9;
+			}
+
+			.yanzheng {
+				background-color: #F89C23;
+			}
+
+		}
+	}
+
+	.code img {
+		width: 100%;
+		height: 100%;
+	}
+
+	.acea-row.row-middle {
+		input {
+			margin-left: 20rpx;
+			display: block;
+		}
+	}
+
+	.login-wrapper {
+		padding: 30rpx;
+
+		.shading {
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			width: 100%;
+			/* #ifdef APP-VUE */
+			margin-top: 50rpx;
+			/* #endif */
+			/* #ifndef APP-VUE */
+
+			margin-top: 200rpx;
+			/* #endif */
+
+
+			image {
+				width: 180rpx;
+				height: 180rpx;
+			}
+		}
+
+		.whiteBg {
+			margin-top: 100rpx;
+
+			.list {
+				border-radius: 16rpx;
+				overflow: hidden;
+
+				.item {
+					border-bottom: 1px solid #F0F0F0;
+					background: #fff;
+
+					.row-middle {
+						position: relative;
+						padding: 16rpx 45rpx;
+
+						input {
+							flex: 1;
+							font-size: 28rpx;
+							height: 80rpx;
+						}
+
+						.code {
+							color: #E93323;
+							font-size: 26rpx;
+							transform: translateY(-50%);
+						}
+					}
+				}
+			}
+
+			.logon {
+				display: flex;
+				align-items: center;
+				justify-content: center;
+				width: 100%;
+				height: 86rpx;
+				margin-top: 80rpx;
+				background-color: $theme-color;
+				border-radius: 120rpx;
+				color: #FFFFFF;
+				font-size: 30rpx;
+			}
+
+			.tips {
+				margin: 30rpx;
+				text-align: center;
+				color: #999;
+			}
+		}
+	}
+</style>

+ 2 - 2
pages/store/home/index.vue

@@ -91,9 +91,9 @@
 					<text class="iconfont icon-kefu3"></text>
 				</view>
 				<!-- #endif -->
-				<view v-else class="kefu" @click="goService">
+<!-- 				<view v-else class="kefu" @click="goService">
 					<text class="iconfont icon-kefu3"></text>
-				</view>
+				</view> -->
 				<button hover-class="none" :class="store.care ? 'care' : ''" v-if="!isLogin" @click="authOpen">
 					<text v-show="!store.care" class="iconfont icon-guanzhu"></text>
 					{{ store.care ? '已关注' : '关注' }}

+ 93 - 90
pages/users/order_confirm/index.vue

@@ -303,11 +303,15 @@
 					<view>运费:</view>
 					<view class='money'>¥{{couponData.order_total_postage}}</view>
 				</view>
-				<view class='item acea-row row-between-wrapper' v-if="coupon_price > 0">
+				<view class='item acea-row row-between-wrapper' v-if="couponData.order_total_integral_price*1> 0">
+					<view>{{is_xfq == 1 ? '消费券抵扣': '积分抵扣' }}:</view>
+					<view class='money'>¥{{couponData.order_total_integral_price}}</view>
+				</view>
+				<!-- <view class='item acea-row row-between-wrapper' v-if="coupon_price > 0">
 					<view>店铺优惠金额:</view>
 					<view class='money'>-¥{{coupon_price}}</view>
-				</view>
-				<view class='item acea-row row-between-wrapper'
+				</view> -->
+				<!-- <view class='item acea-row row-between-wrapper'
 					v-if="open_integral && userInfo.integral>0 && order_type == 0">
 					<view>积分抵扣:</view>
 					<view class='money'>
@@ -319,8 +323,8 @@
 							</label>
 						</checkbox-group>
 					</view>
-				</view>
-<!-- 				<view class='item acea-row row-between-wrapper'
+				</view> -->
+				<!-- 				<view class='item acea-row row-between-wrapper'
 					v-if="!seckillId && order_type != 3 && order_type != 4 && enabledPlatformCoupon">
 					<view>平台优惠券<text @tap="showCoupon" class="iconfont icon-wenhao1"></text></view>
 					<block v-if="platformCoupon.length > 0">
@@ -387,6 +391,7 @@
 	// +----------------------------------------------------------------------
 	let app = getApp();
 	import {
+		orderPay,
 		orderConfirm,
 		getOrderConfirm,
 		getCouponsOrderPrice,
@@ -464,7 +469,7 @@
 					{
 						"name": "微信支付",
 						"icon": "icon-weixin2",
-						value: 'weixin_s',
+						value: 'h5',
 						title: '微信快捷支付',
 						payStatus: 1,
 					},
@@ -579,7 +584,9 @@
 				enabledPlatformCoupon: false,
 				plantCoupon: false,
 				isShowDiscount: false,
-				order_key: ''
+				order_key: '',
+				is_jf: 0,
+				is_xfq: 0
 			};
 		},
 		computed: {
@@ -597,17 +604,13 @@
 		onReady() {},
 		mounted: function() {},
 		onLoad: function(options) {
-			// if(options.is_xfq == 1 || options.is_jf == 1) {
-
-			// }else {
-			// 	this.cartArr = [{
-			// 			"name": "余额支付",
-			// 			"icon": "icon-icon-test",
-			// 			value: 'balance',
-			// 			title: '可用余额:',
-			// 			payStatus: this.$store.getters.globalData.yue_pay_status,
-			// 		}]
-			// }
+			if (options.is_xfq) {
+				this.is_xfq = options.is_xfq
+			}
+			if (options.is_jf) {
+				this.is_jf = options.is_jf
+			}
+
 			this.seckillId = options.seckillId
 			// #ifdef H5
 			this.from = this.$wechat.isWeixin() ? 'weixin' : 'h5'
@@ -911,15 +914,14 @@
 					return
 				}
 				this.totalPrice = tempTotal
-				if(this.totalPrice == 0) {
+				if (this.totalPrice == 0) {
 					this.cartArr = [{
-							"name": "余额支付",
-							"icon": "icon-icon-test",
-							value: 'balance',
-							title: '可用余额:',
-							payStatus: this.$store.getters.globalData.yue_pay_status,
-						}
-					]
+						"name": "余额支付",
+						"icon": "icon-icon-test",
+						value: 'balance',
+						title: '可用余额:',
+						payStatus: this.$store.getters.globalData.yue_pay_status,
+					}]
 				}
 			},
 			/**
@@ -964,7 +966,8 @@
 					address_id: address_id,
 					takes: that.take,
 					use_coupon: that.subCoupon,
-					use_integral: that.use_integral
+					use_integral: that.use_integral,
+					userConsumption: that.is_xfq == 1 ? 1 : 0
 				}).then(res => {
 					// 默认选中
 					res.data.order.forEach(el => {
@@ -1028,13 +1031,12 @@
 					uni.hideLoading();
 					if (that.totalPrice == 0) {
 						that.cartArr = [{
-								"name": "余额支付",
-								"icon": "icon-icon-test",
-								value: 'balance',
-								title: '可用余额:',
-								payStatus: this.$store.getters.globalData.yue_pay_status,
-							}
-						]
+							"name": "余额支付",
+							"icon": "icon-icon-test",
+							value: 'balance',
+							title: '可用余额:',
+							payStatus: this.$store.getters.globalData.yue_pay_status,
+						}]
 					}
 				}).catch(err => {
 					return this.$util.Tips({
@@ -1178,64 +1180,64 @@
 							break;
 							// #ifndef MP
 						case "wechat":
-						case "weixin_s":
+						case "weixin":
 						case "weixinApp":
 							jsConfig.timeStamp = jsConfig.timestamp;
-							// // #ifndef APP-PLUS
-							// console.log(jsConfig.timestamp,res,'ddddddddddddddddddddddddddddddd')
-							// this.$wechat.pay(jsConfig).then(res => {
-							// 	console.log('测试支付数据无效的success:' + res.data)
-							// 	return that.$util.Tips({
-							// 		title: res.message,
-							// 		icon: 'success'
-							// 	}, {
-							// 		tab: 4,
-							// 		url: goPages
-							// 	});
-							// }).catch(res => {
-							// 	console.log('测试支付数据无效的catch:' + res.data)
-							// 	if (res.errMsg == 'chooseWXPay:cancel') return that.$util.Tips({
-							// 		title: '取消支付'
-							// 	}, {
-							// 		tab: 5,
-							// 		url: goPages + '&status=0'
-							// 	});
-							// })
-							// // #endif
-							// // #ifdef APP-PLUS
-							// uni.requestPayment({
-							// 	provider: 'wxpay',
-							// 	orderInfo: jsConfig,
-							// 	success: (e) => {
-							// 		let url = '/pages/order_pay_status/index?order_id=' + orderId +
-							// 			'&msg=支付成功';
-							// 		return that.$util.Tips({
-							// 			title: '支付成功',
-							// 			icon: 'success'
-							// 		}, {
-							// 			tab: 4,
-							// 			url: url
-							// 		});
-							// 	},
-							// 	fail: (e) => {
-							// 		uni.showModal({
-							// 			content: "支付失败",
-							// 			showCancel: false,
-							// 			success: function(res) {
-							// 				let url =
-							// 					'/pages/order_pay_status/index?order_id=' +
-							// 					orderId + '&msg=支付失败';
-							// 				uni.redirectTo({
-							// 					url: url
-							// 				})
-							// 			}
-							// 		})
-							// 	},
-							// 	complete: () => {
-							// 		uni.hideLoading();
-							// 	},
-							// });
-							// // #endif
+							// #ifndef APP-PLUS
+							console.log(jsConfig.timestamp,res,'ddddddddddddddddddddddddddddddd')
+							this.$wechat.pay(jsConfig).then(res => {
+								console.log('测试支付数据无效的success:' + res.data)
+								return that.$util.Tips({
+									title: res.message,
+									icon: 'success'
+								}, {
+									tab: 4,
+									url: goPages
+								});
+							}).catch(res => {
+								console.log('测试支付数据无效的catch:' + res.data)
+								if (res.errMsg == 'chooseWXPay:cancel') return that.$util.Tips({
+									title: '取消支付'
+								}, {
+									tab: 5,
+									url: goPages + '&status=0'
+								});
+							})
+							// #endif
+							// #ifdef APP-PLUS
+							uni.requestPayment({
+								provider: 'wxpay',
+								orderInfo: jsConfig,
+								success: (e) => {
+									let url = '/pages/order_pay_status/index?order_id=' + orderId +
+										'&msg=支付成功';
+									return that.$util.Tips({
+										title: '支付成功',
+										icon: 'success'
+									}, {
+										tab: 4,
+										url: url
+									});
+								},
+								fail: (e) => {
+									uni.showModal({
+										content: "支付失败",
+										showCancel: false,
+										success: function(res) {
+											let url =
+												'/pages/order_pay_status/index?order_id=' +
+												orderId + '&msg=支付失败';
+											uni.redirectTo({
+												url: url
+											})
+										}
+									})
+								},
+								complete: () => {
+									uni.hideLoading();
+								},
+							});
+							// #endif
 							break;
 							// #endif
 							// #ifdef MP
@@ -1471,6 +1473,7 @@
 					// #ifdef H5
 					return_url: 'http://' + window.location.host + '/pages/users/order_list/index',
 					// #endif
+					userConsumption: this.is_xfq == 1 ? 1 : 0
 				};
 				if (data.mark && this.isEmojiCharacter(data.mark[Object.keys(data.mark)[0]])) {
 					that.$util.Tips({

+ 26 - 20
pages/users/user_money/index.vue

@@ -41,15 +41,14 @@
 						<view class="order-item flex" v-for="(item, index) in tabItem.orderList" :key="index">
 							<view class="title-box">
 								<view class="title">
-									<text>{{ item.title }}</text>
+									<text>{{ item.mark }}</text>
 								</view>
 								<view class="time">
-									<text>{{ item.add_time }}</text>
+									<text>{{ item.create_time }}</text>
 								</view>
 							</view>
 							<view class="money">
 								<view>{{ (item.pm == 0 ? '-' : '+') + item.number }}</view>
-								<view v-if="item.status == 0" class="status">待发放</view>
 							</view>
 						</view>
 					</view>
@@ -135,7 +134,7 @@ export default {
 	methods: {
 		toBack() {
 			uni.switchTab({
-				url: '/pages/user/user'
+				url: '/pages/user/index'
 			});
 		},
 		// 页面跳转
@@ -168,22 +167,29 @@ export default {
 				type: state
 			})
 				.then(({ data }) => {
-					if (data.length > 0) {
-						data.forEach(item => {
-							console.log(item.list, '内部列表');
-							navItem.orderList = navItem.orderList.concat(item.list);
-						});
-						// navItem.orderList = navItem.orderList.concat(data[0].list);
-						console.log(navItem.orderList);
-						navItem.page++;
-					}
-					if (navItem.limit == data.length) {
-						//判断是否还有数据, 有改为 more, 没有改为noMore
-						navItem.loadingType = 'more';
-						return;
-					} else {
-						//判断是否还有数据, 有改为 more, 没有改为noMore
-						navItem.loadingType = 'noMore';
+					// if (data.length > 0) {
+					// 	data.forEach(item => {
+					// 		console.log(item.list, '内部列表');
+					// 		navItem.orderList = navItem.orderList.concat(item.list);
+					// 	});
+					// 	// navItem.orderList = navItem.orderList.concat(data[0].list);
+					// 	console.log(navItem.orderList);
+					// 	navItem.page++;
+					// }
+					// if (navItem.limit == data.length) {
+					// 	//判断是否还有数据, 有改为 more, 没有改为noMore
+					// 	navItem.loadingType = 'more';
+					// 	return;
+					// } else {
+					// 	//判断是否还有数据, 有改为 more, 没有改为noMore
+					// 	navItem.loadingType = 'noMore';
+					// }
+					navItem.orderList = navItem.orderList.concat(data.list)
+					navItem.page++
+					if(navItem.limit == data.list.length) {
+							navItem.loadingType = 'more';
+					}else {
+						navItem.loadingType = 'noMore'
 					}
 					uni.hideLoading();
 					this.$set(navItem, 'loaded', true);

BIN
static/img/hqyg.png


BIN
static/img/live_weixin.png