Explorar el Código

【模版目录】更新用户端页面源码

吴昊天 hace 3 años
padre
commit
4dbe755fa5
Se han modificado 41 ficheros con 5901 adiciones y 5819 borrados
  1. 77 60
      template/uni-app/App.vue
  2. 1 1
      template/uni-app/config/app.js
  3. 0 1
      template/uni-app/libs/routine.js
  4. 3 3
      template/uni-app/libs/wechat.js
  5. 95 87
      template/uni-app/main.js
  6. 8 2
      template/uni-app/manifest.json
  7. 1 1
      template/uni-app/pages.json
  8. 0 5
      template/uni-app/pages/activity/goods_bargain_details/index.vue
  9. 1 5
      template/uni-app/pages/activity/goods_seckill_details/index.vue
  10. 0 7
      template/uni-app/pages/activity/presell_details/index.vue
  11. 11 11
      template/uni-app/pages/admin/components/uni-calendar/uni-calendar.vue
  12. 1 3
      template/uni-app/pages/admin/orderDetail/index.vue
  13. 6 2
      template/uni-app/pages/admin/orderList/index.vue
  14. 1 0
      template/uni-app/pages/auth/index.vue
  15. 6 4
      template/uni-app/pages/goods/order_confirm/index.vue
  16. 2187 2158
      template/uni-app/pages/goods/order_details/index.vue
  17. 469 468
      template/uni-app/pages/goods_cate/goods_cate1.vue
  18. 0 7
      template/uni-app/pages/goods_details/index.vue
  19. 1 1
      template/uni-app/pages/index/diy/components/headerSerch.vue
  20. 2 2
      template/uni-app/pages/index/diy/components/liveBroadcast.vue
  21. 96 91
      template/uni-app/pages/index/index.vue
  22. 1 1
      template/uni-app/pages/index/visualization/components/headerSerch.vue
  23. 1 1
      template/uni-app/pages/index/visualization/components/menus.vue
  24. 2 2
      template/uni-app/pages/index/visualization/components/newGoods.vue
  25. 2 2
      template/uni-app/pages/index/visualization/components/popular.vue
  26. 2 2
      template/uni-app/pages/index/visualization/components/promotion.vue
  27. 2 2
      template/uni-app/pages/index/visualization/components/recommend.vue
  28. 3 3
      template/uni-app/pages/index/visualization/components/scrollBox.vue
  29. 300 294
      template/uni-app/pages/index/visualization/components/swiperBg.vue
  30. 1380 1371
      template/uni-app/pages/order_addcart/order_addcart.vue
  31. 0 4
      template/uni-app/pages/points_mall/integral_goods_details.vue
  32. 1 7
      template/uni-app/pages/user/index.vue
  33. 1 1
      template/uni-app/pages/users/components/login_mobile/routine_phone.vue
  34. 1 0
      template/uni-app/pages/users/login/index.vue
  35. 482 473
      template/uni-app/pages/users/user_address_list/index.vue
  36. 17 12
      template/uni-app/pages/users/user_info/index.vue
  37. 456 452
      template/uni-app/pages/users/user_money/index.vue
  38. 17 6
      template/uni-app/pages/users/wechat_login/index.vue
  39. 96 96
      template/uni-app/store/modules/app.js
  40. 166 167
      template/uni-app/utils/index.js
  41. 5 4
      template/uni-app/utils/lang.js

+ 77 - 60
template/uni-app/App.vue

@@ -81,6 +81,44 @@
 				}
 			}
 		},
+		onShow() {
+			const queryData = uni.getEnterOptionsSync()  // uni-app版本 3.5.1+ 支持
+			if (queryData.query.spread) {
+				this.$Cache.set('spread', queryData.query.spread);
+				this.globalData.spid = queryData.query.spread;
+				this.globalData.pid = queryData.query.spread;
+				silenceBindingSpread(this.globalData)
+			}
+			if (queryData.query.spid) {
+				this.$Cache.set('spread', queryData.query.spid);
+				this.globalData.spid = queryData.query.spid;
+				this.globalData.pid = queryData.query.spid;
+				silenceBindingSpread(this.globalData)
+			}
+			// #ifdef MP
+			if (queryData.query.scene) {
+				switch (queryData.scene) {
+					//扫描小程序码
+					case 1047:
+						this.globalData.code = queryData.query.scene;
+						break;
+						//长按图片识别小程序码
+					case 1048:
+						this.globalData.code = queryData.query.scene;
+						break;
+						//手机相册选取小程序码
+					case 1049:
+						this.globalData.code = queryData.query.scene;
+						break;
+						//直接进入小程序
+					case 1001:
+						this.globalData.spid = queryData.query.scene;
+						break;
+				}
+				silenceBindingSpread(this.globalData)
+			}
+			// #endif
+		},
 		async onLaunch(option) {
 			let that = this;
 			colorChange('color_change').then(res => {
@@ -113,25 +151,14 @@
 						break
 				}
 			});
-			console.log(Cache.has('localeJson', true))
-			if (!Cache.has('localeJson', true)) {
+			if (!Cache.has('localeSet')) {
 				getLangJson().then(res => {
-					Cache.set('localeJson', res.data, 600);
-					// uni.setStorageSync('localeJson', res.data)
+					Cache.set('locale', Object.keys(res.data)[0])
+					uni.setStorageSync('localeJson', res.data);
+					Cache.set('localeSet', true, 600) // 语言类型缓存时间
 				})
 			}
-			if (option.query.spread) {
-				that.$Cache.set('spread', option.query.spread);
-				that.globalData.spid = option.query.spread;
-				that.globalData.pid = option.query.spread;
-				silenceBindingSpread()
-			}
-			if (option.query.spid) {
-				that.$Cache.set('spread', option.query.spid);
-				that.globalData.spid = option.query.spid;
-				that.globalData.pid = option.query.spid;
-				// silenceBindingSpread()
-			}
+
 			// #ifdef APP-PLUS || H5
 			uni.getSystemInfo({
 				success: function(res) {
@@ -155,53 +182,43 @@
 				);
 				return false;
 			}
-			if (option.query.hasOwnProperty('scene')) {
 
-				switch (option.scene) {
-					//扫描小程序码
-					case 1047:
-						let val = that.$util.getUrlParams(decodeURIComponent(option.query.scene));
-						that.globalData.code = val.pid === undefined ? val : val.pid;
-						break;
-						//长按图片识别小程序码
-					case 1048:
-						that.globalData.code = option.query.scene;
-						break;
-						//手机相册选取小程序码
-					case 1049:
-						that.globalData.code = option.query.scene;
-						break;
-						//直接进入小程序
-					case 1001:
-						that.globalData.spid = option.query.scene;
-						break;
-				}
-			}
 			const updateManager = wx.getUpdateManager();
-
-			updateManager.onCheckForUpdate(function(res) {
-				// 请求完新版本信息的回调
-			});
-
-			updateManager.onUpdateReady(function() {
-				wx.showModal({
-					title: '更新提示',
-					content: '新版本已经准备好,是否重启应用?',
-					success: function(res) {
-						if (res.confirm) {
-							// 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
-							updateManager.applyUpdate();
-						}
+			const startParamObj = wx.getEnterOptionsSync();
+			if (wx.canIUse('getUpdateManager') && startParamObj.scene != 1154) {
+				const updateManager = wx.getUpdateManager()
+				console.log(updateManager);
+				updateManager.onCheckForUpdate(function(res) {
+					// 请求完新版本信息的回调
+					// console.log(res.hasUpdate)
+					if (res.hasUpdate) {
+						updateManager.onUpdateFailed(function() {
+							return that.Tips({
+								title: '新版本下载失败'
+							});
+						});
+						updateManager.onUpdateReady(function() {
+							wx.showModal({
+								title: '更新提示',
+								content: '新版本已经下载好,是否重启当前应用?',
+								success(res) {
+									if (res.confirm) {
+										updateManager.applyUpdate()
+									}
+								}
+							})
+						})
+						updateManager.onUpdateFailed(function() {
+							wx.showModal({
+								title: '发现新版本',
+								content: '请删除当前小程序,重启搜索打开...',
+							})
+						})
 					}
-				});
-			});
-
-			updateManager.onUpdateFailed(function() {
-				return that.Tips({
-					title: '新版本下载失败'
-				});
-			});
+				})
+			}
 			// #endif
+
 			// getShopConfig().then(res => {
 			// 	this.$store.commit('SETPHONESTATUS', res.data.status);
 			// });
@@ -215,7 +232,7 @@
 			let menuButtonInfo = uni.getMenuButtonBoundingClientRect();
 			that.globalData.navH = menuButtonInfo.top * 2 + menuButtonInfo.height / 2;
 			const version = uni.getSystemInfoSync().SDKVersion
-			if (Routine.compareVersion(version, '2.21.2') >= 0) {
+			if (Routine.compareVersion(version, '2.21.3') >= 0) {
 				console.log(version)
 				that.$Cache.set('MP_VERSION_ISNEW', true)
 			} else {

+ 1 - 1
template/uni-app/config/app.js

@@ -9,7 +9,7 @@ module.exports = {
 	// #ifdef H5
 	//H5接口是浏览器地址,非单独部署不用修改
 	HTTP_REQUEST_URL: window.location.protocol + "//" + window.location.host,
-	// #endif
+	// #endif 
 
 	// 以下配置在不做二开的前提下,不需要做任何的修改
 	HEADER: {

+ 0 - 1
template/uni-app/libs/routine.js

@@ -153,7 +153,6 @@ class Routine {
 			uni.login({
 				provider: provider,
 				success(res) {
-					console.log(res, '22222')
 					if (res.code) Cache.set(STATE_R_KEY, res.code, 10800);
 					return resolve(res.code);
 				},

+ 3 - 3
template/uni-app/libs/wechat.js

@@ -48,9 +48,9 @@ class AuthWechat {
 	}
 
 	signLink() {
-		if (typeof window.entryUrl === 'undefined' || window.entryUrl === '') {
-			window.entryUrl = document.location.href
-		}
+		// if (typeof window.entryUrl === 'undefined' || window.entryUrl === '') {
+		// 	window.entryUrl = encodeURI(window.location.href)
+		// }
 		return /(Android)/i.test(navigator.userAgent) ? document.location.href : window.entryUrl;
 	}
 

+ 95 - 87
template/uni-app/main.js

@@ -1,87 +1,95 @@
-// +----------------------------------------------------------------------
-// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
-// +----------------------------------------------------------------------
-// | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved.
-// +----------------------------------------------------------------------
-// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
-// +----------------------------------------------------------------------
-// | Author: CRMEB Team <admin@crmeb.com>
-// +----------------------------------------------------------------------
-
-import Vue from 'vue'
-import App from './App'
-import store from './store'
-import Cache from './utils/cache'
-import util from 'utils/util'
-import configs from './config/app.js'
-import socket from './libs/new_chat.js'
-import i18n from './utils/lang.js';
-Vue.prototype.$util = util;
-Vue.prototype.$config = configs;
-Vue.prototype.$Cache = Cache;
-Vue.prototype.$eventHub = new Vue();
-Vue.prototype.$socket = new socket();
-Vue.config.productionTip = false
-import pageLoading from './components/pageLoading.vue'
-import skeleton from './components/skeleton/index.vue'
-
-Vue.component('skeleton', skeleton)
-Vue.component('pageLoading',pageLoading) 
-
-
-// #ifdef H5
-
-
-import { parseQuery } from "./utils";
-import Auth from './libs/wechat';
-import { SPREAD } from './config/cache';
-Vue.prototype.$wechat = Auth;
-
-
-
-let cookieName = "VCONSOLE",
-	query = parseQuery(),
-	urlSpread = query["spread"],
-	vconsole = query[cookieName.toLowerCase()],
-	md5Crmeb = "b14d1e9baeced9bb7525ab19ee35f2d2", //CRMEB MD5 加密开启vconsole模式
-	md5UnCrmeb = "3dca2162c4e101b7656793a1af20295c"; //UN_CREMB MD5 加密关闭vconsole模式
-
-if (urlSpread !== undefined) {
-	var spread = Cache.get(SPREAD);
-	urlSpread = parseInt(urlSpread);
-	if (!Number.isNaN(urlSpread) && spread !== urlSpread) {
-		Cache.set("spread", urlSpread || 0);
-	} else if (spread === 0 || typeof spread !== "number") {
-		Cache.set("spread", urlSpread || 0);
-	}
-}
-
-if (vconsole !== undefined) {
-  if (vconsole === md5UnCrmeb && Cache.has(cookieName))
-	  Cache.clear(cookieName);
-} else vconsole = Cache.get(cookieName);
-
-import VConsole from './pages/extension/components/vconsole.min.js'
-
-if (vconsole !== undefined && vconsole === md5Crmeb) {
-	Cache.set(cookieName, md5Crmeb, 3600);
-	let vConsole = new VConsole();
-}
-
-// let snsapiBase = 'snsapi_base';
-// Auth.isWeixin() && Auth.oAuth(snsapiBase);
-
-
-//全局路由前置守卫
-// #endif
-
-App.mpType = 'app'
-
-
-const app = new Vue({
-    ...App,
-	store,
-	Cache,
-	i18n,
-})
-app.$mount();
+// +----------------------------------------------------------------------
+// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
+// +----------------------------------------------------------------------
+// | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved.
+// +----------------------------------------------------------------------
+// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
+// +----------------------------------------------------------------------
+// | Author: CRMEB Team <admin@crmeb.com>
+// +----------------------------------------------------------------------
+
+import Vue from 'vue'
+import App from './App'
+import store from './store'
+import Cache from './utils/cache'
+import util from 'utils/util'
+import configs from './config/app.js'
+import socket from './libs/new_chat.js'
+import i18n from './utils/lang.js';
+Vue.prototype.$util = util;
+Vue.prototype.$config = configs;
+Vue.prototype.$Cache = Cache;
+Vue.prototype.$eventHub = new Vue();
+Vue.prototype.$socket = new socket();
+Vue.config.productionTip = false
+import pageLoading from './components/pageLoading.vue'
+import skeleton from './components/skeleton/index.vue'
+
+Vue.component('skeleton', skeleton)
+Vue.component('pageLoading', pageLoading)
+
+
+// #ifdef H5
+
+
+import {
+	parseQuery
+} from "./utils";
+import Auth from './libs/wechat';
+import {
+	SPREAD
+} from './config/cache';
+Vue.prototype.$wechat = Auth;
+
+
+
+let cookieName = "VCONSOLE",
+	query = parseQuery(),
+	urlSpread = query["spread"],
+	vconsole = query[cookieName.toLowerCase()],
+	md5Crmeb = "b14d1e9baeced9bb7525ab19ee35f2d2", //CRMEB MD5 加密开启vconsole模式
+	md5UnCrmeb = "3dca2162c4e101b7656793a1af20295c"; //UN_CREMB MD5 加密关闭vconsole模式
+
+if (urlSpread !== undefined) {
+	var spread = Cache.get(SPREAD);
+	urlSpread = parseInt(urlSpread);
+	if (!Number.isNaN(urlSpread) && spread !== urlSpread) {
+		Cache.set("spread", urlSpread || 0);
+	} else if (spread === 0 || typeof spread !== "number") {
+		Cache.set("spread", urlSpread || 0);
+	}
+}
+
+if (vconsole !== undefined) {
+	if (vconsole === md5UnCrmeb && Cache.has(cookieName))
+		Cache.clear(cookieName);
+} else vconsole = Cache.get(cookieName);
+
+import VConsole from './pages/extension/components/vconsole.min.js'
+
+if (vconsole !== undefined && vconsole === md5Crmeb) {
+	Cache.set(cookieName, md5Crmeb, 3600);
+	let vConsole = new VConsole();
+}
+
+// let snsapiBase = 'snsapi_base';
+// Auth.isWeixin() && Auth.oAuth(snsapiBase);
+
+// 记录进入app时的url
+if (typeof window.entryUrl === 'undefined' || window.entryUrl === '') {
+	window.entryUrl = location.href
+}
+
+//全局路由前置守卫
+// #endif
+
+App.mpType = 'app'
+
+
+const app = new Vue({
+	...App,
+	store,
+	Cache,
+	i18n,
+})
+app.$mount();

+ 8 - 2
template/uni-app/manifest.json

@@ -167,7 +167,7 @@
     "quickapp" : {},
     /* 小程序特有相关 */
     "mp-weixin" : {
-        "appid" : "wx3b82801238ca1b57",
+        "appid" : "wx1234567890",
         "setting" : {
             "urlCheck" : false,
             "minified" : true,
@@ -179,7 +179,13 @@
                 "desc" : "你的位置信息将用于和门店的距离长度"
             }
         },
-        "usingComponents" : true
+        "usingComponents" : true,
+        "requiredPrivateInfos" : [
+            "getLocation",
+            "onLocationChange",
+            "startLocationUpdateBackground",
+            "chooseAddress"
+        ]
     },
     "mp-alipay" : {
         "usingComponents" : true

+ 1 - 1
template/uni-app/pages.json

@@ -944,7 +944,7 @@
 			],
 			"plugins": {
 				"live-player-plugin": {
-					"version": "1.3.2",
+					"version": "1.3.5",
 					"provider": "wx2b03c6e691cd7370"
 				}
 			}

+ 0 - 5
template/uni-app/pages/activity/goods_bargain_details/index.vue

@@ -271,9 +271,6 @@
 	import countDown from '@/components/countDown';
 	import home from '@/components/home';
 	import parser from '@/components/jyf-parser/jyf-parser';
-	import {
-		silenceBindingSpread
-	} from '@/utils';
 	// #ifdef APP-PLUS
 	import {
 		TOKENNAME,
@@ -479,8 +476,6 @@
 					`/pages/activity/goods_bargain_details/index?id=${options.id}&bargain=${this.bargainUid}`);
 				toLogin();
 			}
-
-			this.isLogin && silenceBindingSpread();
 			uni.setNavigationBarTitle({
 				title: this.$t(`砍价详情`)
 			});

+ 1 - 5
template/uni-app/pages/activity/goods_seckill_details/index.vue

@@ -47,7 +47,7 @@
 						<view class='nav acea-row row-between-wrapper'>
 							<view class='money'>{{$t(`¥`)}}<text class='num'>{{storeInfo.price}}</text>
 								<text
-									v-if="attribute.productAttr.length && (attribute.productAttr.length?attribute.productAttr[0].attr_values.length:0) > 1">{{$t(`onwards`)}}</text>
+									v-if="attribute.productAttr.length && (attribute.productAttr.length?attribute.productAttr[0].attr_values.length:0) > 1">{{$t(``)}}</text>
 								<text class='y-money'>{{$t(`¥`)}}{{storeInfo.ot_price}}</text>
 							</view>
 							<view class='acea-row row-middle'>
@@ -256,9 +256,6 @@
 	import {
 		toLogin
 	} from '@/libs/login.js';
-	import {
-		silenceBindingSpread
-	} from "@/utils";
 	import {
 		getUserInfo
 	} from '@/api/user.js';
@@ -403,7 +400,6 @@
 					//res.windowHeight:获取整个窗口高度为px,*2为rpx;98为头部占据的高度;
 				},
 			});
-			this.isLogin && silenceBindingSpread();
 			// #ifdef MP
 			this.navH = app.globalData.navHeight;
 			// #endif

+ 0 - 7
template/uni-app/pages/activity/presell_details/index.vue

@@ -265,9 +265,6 @@
 	import userEvaluation from '@/components/userEvaluation';
 	import shareRedPackets from '@/components/shareRedPackets';
 	import kefuIcon from '@/components/kefuIcon';
-	import {
-		silenceBindingSpread
-	} from '@/utils';
 	import parser from '@/components/jyf-parser/jyf-parser';
 	import ClipboardJS from '@/plugin/clipboard/clipboard.js';
 	// #ifdef MP
@@ -444,10 +441,6 @@
 			if (options.spid) app.globalData.spid = options.spid;
 			// #endif
 			that.getGoodsDetails();
-			// that.getCouponList(0);
-			//#ifdef H5
-			that.isLogin && silenceBindingSpread();
-			//#endif
 		},
 		onReady: function() {
 			this.$nextTick(function() {

+ 11 - 11
template/uni-app/pages/admin/components/uni-calendar/uni-calendar.vue

@@ -4,21 +4,21 @@
 		<view v-if="insert || show" class="uni-calendar__content" :class="{'uni-calendar--fixed':!insert,'uni-calendar--ani-show':aniMaskShow}">
 			<view v-if="!insert" class="uni-calendar__header uni-calendar--fixed-top">
 				<view class="uni-calendar__header-btn-box" @click="close">
-					<text class="uni-calendar__header-text uni-calendar--fixed-width">{{$t(`cansel`)}}</text>
+					<text class="uni-calendar__header-text uni-calendar--fixed-width">{{$t(`取消`)}}</text>
 				</view>
 				<view class="uni-calendar__header-btn-box" @click="confirm">
-					<text class="uni-calendar__header-text uni-calendar--fixed-width">{{$t(`confirm`)}}</text>
+					<text class="uni-calendar__header-text uni-calendar--fixed-width">{{$t(`确定`)}}</text>
 				</view>
 			</view>
 			<view class="uni-calendar__header">
 				<view class="uni-calendar__header-btn-box" @click="pre">
 					<view class="uni-calendar__header-btn uni-calendar--left"></view>
 				</view>
-				<text class="uni-calendar__header-text">{{ (nowDate.year||'') +$t(`year`)+( nowDate.month||'') +$t(`month`)}}</text>
+				<text class="uni-calendar__header-text">{{ (nowDate.year||'') +$t(`年`)+( nowDate.month||'') +$t(`月`)}}</text>
 				<view class="uni-calendar__header-btn-box" @click="next">
 					<view class="uni-calendar__header-btn uni-calendar--right"></view>
 				</view>
-				<text class="uni-calendar__backtoday" @click="backtoday">{{$t(`back_today`)}}</text>
+				<text class="uni-calendar__backtoday" @click="backtoday">{{$t(`回到当天`)}}</text>
 			</view>
 			<view class="uni-calendar__box">
 				<view v-if="showMonth" class="uni-calendar__box-bg">
@@ -26,25 +26,25 @@
 				</view>
 				<view class="uni-calendar__weeks">
 					<view class="uni-calendar__weeks-day">
-						<text class="uni-calendar__weeks-day-text">{{$t(`sun`)}}</text>
+						<text class="uni-calendar__weeks-day-text">{{$t(``)}}</text>
 					</view>
 					<view class="uni-calendar__weeks-day">
-						<text class="uni-calendar__weeks-day-text">{{$t(`mon`)}}</text>
+						<text class="uni-calendar__weeks-day-text">{{$t(``)}}</text>
 					</view>
 					<view class="uni-calendar__weeks-day">
-						<text class="uni-calendar__weeks-day-text">{{$t(`tue`)}}</text>
+						<text class="uni-calendar__weeks-day-text">{{$t(``)}}</text>
 					</view>
 					<view class="uni-calendar__weeks-day">
-						<text class="uni-calendar__weeks-day-text">{{$t(`wed`)}}</text>
+						<text class="uni-calendar__weeks-day-text">{{$t(``)}}</text>
 					</view>
 					<view class="uni-calendar__weeks-day">
-						<text class="uni-calendar__weeks-day-text">{{$t(`thu`)}}</text>
+						<text class="uni-calendar__weeks-day-text">{{$t(``)}}</text>
 					</view>
 					<view class="uni-calendar__weeks-day">
-						<text class="uni-calendar__weeks-day-text">{{$t(`fri`)}}</text>
+						<text class="uni-calendar__weeks-day-text">{{$t(``)}}</text>
 					</view>
 					<view class="uni-calendar__weeks-day">
-						<text class="uni-calendar__weeks-day-text">{{$t(`sat`)}}</text>
+						<text class="uni-calendar__weeks-day-text">{{$t(``)}}</text>
 					</view>
 				</view>
 				<view class="uni-calendar__weeks" v-for="(item,weekIndex) in weeks" :key="weekIndex">

+ 1 - 3
template/uni-app/pages/admin/orderDetail/index.vue

@@ -714,9 +714,8 @@
 		color: #333;
 		border-radius: 3rpx;
 		border: 1px solid #666;
-		padding: 0rpx 15rpx;
+		padding: 2rpx 15rpx;
 		margin-left: 24rpx;
-		height: 40rpx;
 	}
 
 	.order-details .wrapper .actualPay {
@@ -866,7 +865,6 @@
 		border: 1px solid #666;
 		padding: 0px 7px;
 		margin-left: 12px;
-		height: 20px;
 	}
 
 	.upload .pictrue {

+ 6 - 2
template/uni-app/pages/admin/orderList/index.vue

@@ -370,12 +370,16 @@
 </script>
 
 <style lang="scss" scoped>
-	.pos-order-list {
+	.pos-order-list {
+		padding-top: 96rpx;
 		.search {
 			padding-left: 30rpx;
 			padding-top: 30rpx;
 			background-color: #fff;
-
+			position: fixed;
+			top: 0;
+			left: 0;
+			z-index: 999;
 			.input {
 				width: 598rpx;
 				background-color: #f7f7f7;

+ 1 - 0
template/uni-app/pages/auth/index.vue

@@ -185,6 +185,7 @@
 						captchaType: 'blockPuzzle',
 						captchaVerification: data.captchaVerification
 					}).then(res => {
+						this.sendCode()
 						that.$util.Tips({
 							title: res.msg
 						});

+ 6 - 4
template/uni-app/pages/goods/order_confirm/index.vue

@@ -808,7 +808,8 @@
 					that.$set(that, 'special_invoice', res.data.special_invoice);
 					that.$set(that, 'store_self_mention', res.data.store_self_mention);
 					that.$set(that, 'virtual_type', res.data.virtual_type || 0);
-					that.$set(that, 'integral_open', res.data.integral_open);
+					that.$set(that, 'integral_open', res.data.integral_open);
+					uni.hideLoading()
 					//微信支付是否开启
 					that.cartArr[0].payStatus = res.data.pay_weixin_open || 0
 					//支付宝是否开启
@@ -834,7 +835,6 @@
 					if (this.addressId) {
 						this.computedPrice();
 					}
-					uni.hideLoading()
 				}).catch(err => {
 					uni.hideLoading()
 					return this.$util.Tips({
@@ -871,11 +871,13 @@
 			 * 获取当前金额可用优惠券
 			 * 
 			 */
-			getCouponList: function() {
+			getCouponList: function() {
+				let shippingType = this.shippingType;
 				let that = this;
 				let data = {
 					cartId: this.cartId,
-					'new': this.news
+					'new': this.news,
+					'shippingType': parseInt(shippingType) + 1
 				}
 				getCouponsOrderPrice(this.totalPrice, data).then(res => {
 					that.$set(that.coupon, 'list', res.data);

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 2187 - 2158
template/uni-app/pages/goods/order_details/index.vue


+ 469 - 468
template/uni-app/pages/goods_cate/goods_cate1.vue

@@ -1,469 +1,470 @@
-<template>
-	<view class='productSort copy-data' :style="{height:pageHeight}">
-		<!-- #ifdef APP-PLUS || MP -->
-		<!-- <view class="sys-head" :style="{height:sysHeight}"></view> -->
-		<!-- #endif -->
-		<view class='header acea-row row-center-wrapper'>
-			<view class='acea-row row-between-wrapper input'>
-				<text class='iconfont icon-sousuo'></text>
-				<input type='text' :placeholder="$t('搜索商品名称')" @confirm="searchSubmitValue" confirm-type='search'
-					name="search" placeholder-class='placeholder'></input>
-			</view>
-		</view>
-		<view class="scroll-box">
-			<view class='aside'>
-				<scroll-view scroll-y="true" scroll-with-animation='true' style="height: calc(100% - 100rpx)">
-					<view class='item acea-row row-center-wrapper' :class='index==navActive?"on":""'
-						v-for="(item,index) in productList" :key="index" @click='tap(index,"b"+index)'>
-						<text>{{$t(item.cate_name)}}</text>
-					</view>
-					<!-- #ifdef APP-PLUS -->
-					<view class="item" v-if="newData.status && newData.status.status"></view>
-					<!-- #endif -->
-				</scroll-view>
-			</view>
-
-
-			<view class='conter'>
-				<scroll-view scroll-y="true" :scroll-into-view="toView" @scroll="scroll" scroll-with-animation='true'
-					style="height: 100%;" class="conterScroll">
-					<block v-for="(item,index) in productList" :key="index">
-						<view class='listw' :id="'b'+index">
-							<view class='title acea-row row-center-wrapper'>
-								<view class='line'></view>
-								<view class='name'>{{$t(item.cate_name)}}</view>
-								<view class='line'></view>
-							</view>
-							<view class='list acea-row'>
-								<block v-for="(itemn,indexn) in item.children" :key="indexn">
-									<navigator hover-class='none'
-										:url='"/pages/goods/goods_list/index?sid="+itemn.id+"&title="+itemn.cate_name'
-										class='item acea-row row-column row-middle'>
-										<view class='picture'>
-											<image :src='itemn.pic' v-if="itemn.pic"></image>
-											<image src="/static/images/sort-img.png" v-else></image>
-										</view>
-										<view class='name line1'>{{$t(itemn.cate_name)}}</view>
-									</navigator>
-								</block>
-							</view>
-						</view>
-					</block>
-					<view :style='"height:"+(height-300)+"rpx;"' v-if="number<15"></view>
-				</scroll-view>
-			</view>
-		</view>
-		<tabBar v-if="!is_diy" :pagePath="'/pages/goods_cate/goods_cate'"></tabBar>
-		<view class="foot" v-else-if="is_diy && newData.status && newData.status.status">
-			<view class="page-footer" id="target" :style="{'background-color':newData.bgColor.color[0].item}">
-				<view class="foot-item" v-for="(item,index) in newData.menuList" :key="index" @click="goRouter(item)">
-					<block v-if="item.link == activeRouter">
-						<image :src="item.imgList[0]"></image>
-						<view class="txt" :style="{color:newData.activeTxtColor.color[0].item}">{{$t(item.name)}}</view>
-					</block>
-					<block v-else>
-						<image :src="item.imgList[1]"></image>
-						<view class="txt" :style="{color:newData.txtColor.color[0].item}">{{$t(item.name)}}</view>
-					</block>
-					<div class="count-num" v-if="item.link === '/pages/order_addcart/order_addcart' && cartNum > 0">
-						{{cartNum}}
-					</div>
-				</view>
-			</view>
-		</view>
-	</view>
-</template>
-
-<script>
-	let sysHeight = uni.getSystemInfoSync().statusBarHeight + 'px';
-	import {
-		getCategoryList
-	} from '@/api/store.js';
-	import {
-		mapState,
-		mapGetters
-	} from "vuex"
-	import pageFooter from '@/components/pageFooter/index.vue'
-	import {
-		getNavigation
-	} from '@/api/public.js'
-	import tabBar from "@/pages/index/visualization/components/tabBar.vue";
-	const app = getApp();
-	export default {
-		components: {
-			pageFooter,
-			tabBar
-		},
-		data() {
-			return {
-				navlist: [],
-				productList: [],
-				navActive: 0,
-				number: "",
-				is_diy: uni.getStorageSync('is_diy'),
-				height: 0,
-				hightArr: [],
-				toView: "",
-				tabbarH: 0,
-				footH: 0,
-				windowHeight: 0,
-				newData: {},
-				activeRouter: '',
-				pageHeight: '100%',
-				sysHeight: sysHeight,
-				// #ifdef APP-PLUS
-				pageHeight: app.globalData.windowHeight,
-				// #endif
-				footerStatus: false,
-				lock: false
-			}
-		},
-		computed: {
-			...mapState({
-				cartNum: state => state.indexData.cartNum
-			})
-		},
-		mounted() {
-			let that = this
-			let routes = getCurrentPages();
-			let curRoute = routes[routes.length - 1].route
-			this.activeRouter = '/' + curRoute
-			this.getAllCategory();
-			// if (uni.getStorageSync('FOOTER_BAR')) {
-			// 	this.footerStatus = true
-			// 	uni.hideTabBar()
-			// 	getNavigation().then(res => {
-			// 		this.newData = res.data
-			// 	})
-			// }
-
-			// #ifdef H5
-			uni.getSystemInfo({
-				success: function(res) {
-					that.pageHeight = res.windowHeight + 'px'
-				}
-			});
-			// #endif
-		},
-		methods: {
-			getNav() {
-				getNavigation().then(res => {
-					this.newData = res.data
-					if (this.newData.status && this.newData.status.status) {
-						uni.hideTabBar()
-					} else {
-						uni.showTabBar()
-					}
-				})
-			},
-			goRouter(item) {
-				var pages = getCurrentPages();
-				var page = (pages[pages.length - 1]).$page.fullPath;
-				if (item.link == page) return
-				uni.switchTab({
-					url: item.link,
-					fail(err) {
-						uni.redirectTo({
-							url: item.link
-						})
-					}
-				})
-			},
-			footHeight(data) {
-				this.footH = data
-
-			},
-			infoScroll: function() {
-				let that = this;
-				let len = that.productList.length;
-				this.number = that.productList[len - 1].children.length;
-				//设置商品列表高度
-				uni.getSystemInfo({
-					success: function(res) {
-						that.height = (res.windowHeight) * (750 / res.windowWidth) - 98;
-					},
-				});
-				let height = 0;
-				let hightArr = [];
-				for (let i = 0; i < len; i++) {
-					//获取元素所在位置
-					let query = uni.createSelectorQuery().in(this);
-					let idView = "#b" + i;
-					query.select(idView).boundingClientRect();
-					query.exec(function(res) {
-						let top = res[0].top;
-						hightArr.push(top);
-						that.hightArr = hightArr
-					});
-				};
-			},
-			tap: function(index, id) {
-				this.toView = id;
-				this.navActive = index;
-				this.$set(this, 'lock', true);
-			},
-			getAllCategory: function() {
-				let that = this;
-				getCategoryList().then(res => {
-					that.productList = res.data;
-					that.$nextTick(res => {
-						that.infoScroll();
-					})
-				})
-			},
-			scroll: function(e) {
-				let scrollTop = e.detail.scrollTop;
-				let scrollArr = this.hightArr;
-				if (this.lock) {
-					this.$set(this, 'lock', false);
-					return;
-				}
-				for (let i = 0; i < scrollArr.length; i++) {
-					if (scrollTop >= 0 && scrollTop < scrollArr[1] - scrollArr[0]) {
-						this.navActive = 0
-					} else if (scrollTop >= scrollArr[i] - scrollArr[0] && scrollTop < scrollArr[i + 1] - scrollArr[
-							0]) {
-						this.navActive = i
-					} else if (scrollTop >= scrollArr[scrollArr.length - 1] - scrollArr[0]) {
-						this.navActive = scrollArr.length - 1
-					}
-				}
-			},
-			searchSubmitValue: function(e) {
-				if (this.$util.trim(e.detail.value).length > 0)
-					uni.navigateTo({
-						url: '/pages/goods/goods_list/index?searchValue=' + e.detail.value
-					})
-				else
-					return this.$util.Tips({
-						title: this.$t(`搜索商品名称`)
-					});
-			},
-		}
-	}
-</script>
-<style>
-	page {
-		height: 100%;
-	}
-</style>
-<style scoped lang="scss">
-	/deep/uni-scroll-view {
-		padding-bottom: 0 !important;
-	}
-
-	.sys-title {
-		z-index: 10;
-		position: relative;
-		height: 40px;
-		line-height: 40px;
-		font-size: 30rpx;
-		color: #333;
-		background-color: #fff;
-		// #ifdef APP-PLUS
-		text-align: center;
-		// #endif
-		// #ifdef MP
-		text-align: left;
-		padding-left: 30rpx;
-		// #endif
-	}
-
-	.sys-head {
-		background-color: #fff;
-	}
-
-	.productSort {
-		display: flex;
-		flex-direction: column;
-		//#ifdef MP
-		height: calc(100vh - var(--window-top)) !important;
-		//#endif
-		//#ifndef MP
-		height: 100vh //#endif
-	}
-
-	.productSort .header {
-		width: 100%;
-		height: 96rpx;
-		background-color: #fff;
-		border-bottom: 1rpx solid #f5f5f5;
-	}
-
-	.productSort .header .input {
-		width: 700rpx;
-		height: 60rpx;
-		background-color: #f5f5f5;
-		border-radius: 50rpx;
-		box-sizing: border-box;
-		padding: 0 25rpx;
-	}
-
-	.productSort .header .input .iconfont {
-		font-size: 35rpx;
-		color: #555;
-	}
-
-	.productSort .header .input .placeholder {
-		color: #999;
-	}
-
-	.productSort .header .input input {
-		font-size: 26rpx;
-		height: 100%;
-		width: 597rpx;
-	}
-
-	.productSort .scroll-box {
-		flex: 1;
-		overflow: hidden;
-		display: flex;
-	}
-
-	// #ifndef MP
-	uni-scroll-view {
-		padding-bottom: 100rpx;
-	}
-
-	// #endif
-
-	.productSort .aside {
-		width: 180rpx;
-		height: 100%;
-		overflow: hidden;
-		background-color: #f7f7f7;
-	}
-
-	.productSort .aside .item {
-		height: 100rpx;
-		width: 100%;
-		font-size: 26rpx;
-		color: #424242;
-		text-align: center;
-	}
-
-	.productSort .aside .item.on {
-		background-color: #fff;
-		border-left: 4rpx solid var(--view-theme);
-		width: 100%;
-		color: var(--view-theme);
-		font-weight: bold;
-	}
-
-	.productSort .conter {
-		flex: 1;
-		height: 100%;
-		overflow: hidden;
-		padding: 0 14rpx;
-		background-color: #fff;
-		position: relative;
-	}
-
-	.productSort .conter .listw {
-		padding-top: 20rpx;
-	}
-
-	.productSort .conter .listw .title {
-		height: 90rpx;
-	}
-
-	.productSort .conter .listw .title .line {
-		width: 100rpx;
-		height: 2rpx;
-		background-color: #f0f0f0;
-	}
-
-	.productSort .conter .listw .title .name {
-		font-size: 28rpx;
-		color: #333;
-		margin: 0 30rpx;
-		font-weight: bold;
-	}
-
-	.productSort .conter .list {
-		flex-wrap: wrap;
-	}
-
-	.productSort .conter .list .item {
-		width: 177rpx;
-		margin-top: 26rpx;
-	}
-
-	.productSort .conter .list .item .picture {
-		width: 120rpx;
-		height: 120rpx;
-		border-radius: 50%;
-	}
-
-	.productSort .conter .list .item .picture image {
-		width: 100%;
-		height: 100%;
-		border-radius: 50%;
-	}
-
-	.productSort .conter .list .item .name {
-		font-size: 24rpx;
-		color: #333;
-		height: 56rpx;
-		line-height: 56rpx;
-		width: 120rpx;
-		text-align: center;
-	}
-
-	.page-footer {
-		position: fixed;
-		bottom: 0;
-		z-index: 30;
-		display: flex;
-		align-items: center;
-		justify-content: space-around;
-		width: 100%;
-		height: calc(98rpx+ constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
-		height: calc(98rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
-		box-sizing: border-box;
-		border-top: solid 1rpx #F3F3F3;
-		background-color: #fff;
-		box-shadow: 0px 0px 17rpx 1rpx rgba(206, 206, 206, 0.32);
-		padding-bottom: constant(safe-area-inset-bottom); ///兼容 IOS<11.2/
-		padding-bottom: env(safe-area-inset-bottom); ///兼容 IOS>11.2/
-
-		.foot-item {
-			display: flex;
-			width: max-content;
-			align-items: center;
-			justify-content: center;
-			flex-direction: column;
-			position: relative;
-
-			.count-num {
-				position: absolute;
-				display: flex;
-				justify-content: center;
-				align-items: center;
-				width: 40rpx;
-				height: 40rpx;
-				top: 0rpx;
-				right: -15rpx;
-				color: #fff;
-				font-size: 20rpx;
-				background-color: #FD502F;
-				border-radius: 50%;
-				padding: 4rpx;
-			}
-		}
-
-		.foot-item image {
-			height: 50rpx;
-			width: 50rpx;
-			text-align: center;
-			margin: 0 auto;
-		}
-
-		.foot-item .txt {
-			font-size: 24rpx;
-
-
-			&.active {}
-		}
-	}
+<template>
+	<view class='productSort copy-data' :style="{height:pageHeight}">
+		<!-- #ifdef APP-PLUS || MP -->
+		<!-- <view class="sys-head" :style="{height:sysHeight}"></view> -->
+		<!-- #endif -->
+		<view class='header acea-row row-center-wrapper'>
+			<view class='acea-row row-between-wrapper input'>
+				<text class='iconfont icon-sousuo'></text>
+				<input type='text' :placeholder="$t('搜索商品名称')" @confirm="searchSubmitValue" confirm-type='search'
+					name="search" placeholder-class='placeholder'></input>
+			</view>
+		</view>
+		<view class="scroll-box">
+			<view class='aside'>
+				<scroll-view scroll-y="true" scroll-with-animation='true' style="height: calc(100% - 100rpx)">
+					<view class='item acea-row row-center-wrapper' :class='index==navActive?"on":""'
+						v-for="(item,index) in productList" :key="index" @click='tap(index,"b"+index)'>
+						<text>{{$t(item.cate_name)}}</text>
+					</view>
+					<!-- #ifdef APP-PLUS -->
+					<view class="item" v-if="newData.status && newData.status.status"></view>
+					<!-- #endif -->
+				</scroll-view>
+			</view>
+
+
+			<view class='conter'>
+				<scroll-view scroll-y="true" :scroll-into-view="toView" @scroll="scroll" scroll-with-animation='true'
+					style="height: 100%;" class="conterScroll">
+					<block v-for="(item,index) in productList" :key="index">
+						<view class='listw' :id="'b'+index">
+							<view class='title acea-row row-center-wrapper'>
+								<view class='line'></view>
+								<view class='name'>{{$t(item.cate_name)}}</view>
+								<view class='line'></view>
+							</view>
+							<view class='list acea-row'>
+								<block v-for="(itemn,indexn) in item.children" :key="indexn">
+									<navigator hover-class='none'
+										:url='"/pages/goods/goods_list/index?sid="+itemn.id+"&title="+itemn.cate_name'
+										class='item acea-row row-column row-middle'>
+										<view class='picture'>
+											<image :src='itemn.pic' v-if="itemn.pic"></image>
+											<image src="/static/images/sort-img.png" v-else></image>
+										</view>
+										<view class='name line1'>{{$t(itemn.cate_name)}}</view>
+									</navigator>
+								</block>
+							</view>
+						</view>
+					</block>
+					<view :style='"height:"+(height-300)+"rpx;"' v-if="number<15"></view>
+				</scroll-view>
+			</view>
+		</view>
+		<tabBar v-if="!is_diy" :pagePath="'/pages/goods_cate/goods_cate'"></tabBar>
+		<view class="foot" v-else-if="is_diy && newData.status && newData.status.status">
+			<view class="page-footer" id="target" :style="{'background-color':newData.bgColor.color[0].item}">
+				<view class="foot-item" v-for="(item,index) in newData.menuList" :key="index" @click="goRouter(item)">
+					<block v-if="item.link == activeRouter">
+						<image :src="item.imgList[0]"></image>
+						<view class="txt" :style="{color:newData.activeTxtColor.color[0].item}">{{$t(item.name)}}</view>
+					</block>
+					<block v-else>
+						<image :src="item.imgList[1]"></image>
+						<view class="txt" :style="{color:newData.txtColor.color[0].item}">{{$t(item.name)}}</view>
+					</block>
+					<div class="count-num" v-if="item.link === '/pages/order_addcart/order_addcart' && cartNum > 0">
+						{{cartNum}}
+					</div>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	let sysHeight = uni.getSystemInfoSync().statusBarHeight + 'px';
+	import {
+		getCategoryList
+	} from '@/api/store.js';
+	import {
+		mapState,
+		mapGetters
+	} from "vuex"
+	import pageFooter from '@/components/pageFooter/index.vue'
+	import {
+		getNavigation
+	} from '@/api/public.js'
+	import tabBar from "@/pages/index/visualization/components/tabBar.vue";
+	const app = getApp();
+	export default {
+		components: {
+			pageFooter,
+			tabBar
+		},
+		data() {
+			return {
+				navlist: [],
+				productList: [],
+				navActive: 0,
+				number: "",
+				is_diy: uni.getStorageSync('is_diy'),
+				height: 0,
+				hightArr: [],
+				toView: "",
+				tabbarH: 0,
+				footH: 0,
+				windowHeight: 0,
+				newData: {},
+				activeRouter: '',
+				pageHeight: '100%',
+				sysHeight: sysHeight,
+				// #ifdef APP-PLUS
+				pageHeight: app.globalData.windowHeight,
+				// #endif
+				footerStatus: false,
+				lock: false
+			}
+		},
+		computed: {
+			...mapState({
+				cartNum: state => state.indexData.cartNum
+			})
+		},
+		mounted() {
+			let that = this
+			// #ifdef H5
+			uni.getSystemInfo({
+				success: function(res) {
+					that.pageHeight = res.windowHeight + 'px'
+				}
+			});
+			// #endif
+			let routes = getCurrentPages();
+			let curRoute = routes[routes.length - 1].route
+			this.activeRouter = '/' + curRoute
+			this.getAllCategory();
+			// if (uni.getStorageSync('FOOTER_BAR')) {
+			// 	this.footerStatus = true
+			// 	uni.hideTabBar()
+			// 	getNavigation().then(res => {
+			// 		this.newData = res.data
+			// 	})
+			// }
+
+
+		},
+		methods: {
+			getNav() {
+				getNavigation().then(res => {
+					this.newData = res.data
+					if (this.newData.status && this.newData.status.status) {
+						uni.hideTabBar()
+					} else {
+						uni.showTabBar()
+					}
+				})
+			},
+			goRouter(item) {
+				var pages = getCurrentPages();
+				var page = (pages[pages.length - 1]).$page.fullPath;
+				if (item.link == page) return
+				uni.switchTab({
+					url: item.link,
+					fail(err) {
+						uni.redirectTo({
+							url: item.link
+						})
+					}
+				})
+			},
+			footHeight(data) {
+				this.footH = data
+
+			},
+			infoScroll: function() {
+				let that = this;
+				let len = that.productList.length;
+				this.number = that.productList[len - 1].children.length;
+				//设置商品列表高度
+				uni.getSystemInfo({
+					success: function(res) {
+						that.height = (res.windowHeight) * (750 / res.windowWidth) - 98;
+					},
+				});
+				let height = 0;
+				let hightArr = [];
+				for (let i = 0; i < len; i++) {
+					//获取元素所在位置
+					let query = uni.createSelectorQuery().in(this);
+					let idView = "#b" + i;
+					query.select(idView).boundingClientRect();
+					query.exec(function(res) {
+						let top = res[0].top;
+						hightArr.push(top);
+						that.hightArr = hightArr
+					});
+				};
+			},
+			tap: function(index, id) {
+				this.toView = id;
+				this.navActive = index;
+				this.$set(this, 'lock', true);
+			},
+			getAllCategory: function() {
+				let that = this;
+				getCategoryList().then(res => {
+					that.productList = res.data;
+					that.$nextTick(res => {
+						that.infoScroll();
+					})
+				})
+			},
+			scroll: function(e) {
+				let scrollTop = e.detail.scrollTop;
+				let scrollArr = this.hightArr;
+				if (this.lock) {
+					this.$set(this, 'lock', false);
+					return;
+				}
+				for (let i = 0; i < scrollArr.length; i++) {
+					if (scrollTop >= 0 && scrollTop < scrollArr[1] - scrollArr[0]) {
+						this.navActive = 0
+					} else if (scrollTop >= scrollArr[i] - scrollArr[0] && scrollTop < scrollArr[i + 1] - scrollArr[
+							0]) {
+						this.navActive = i
+					} else if (scrollTop >= scrollArr[scrollArr.length - 1] - scrollArr[0]) {
+						this.navActive = scrollArr.length - 1
+					}
+				}
+			},
+			searchSubmitValue: function(e) {
+				if (this.$util.trim(e.detail.value).length > 0)
+					uni.navigateTo({
+						url: '/pages/goods/goods_list/index?searchValue=' + e.detail.value
+					})
+				else
+					return this.$util.Tips({
+						title: this.$t(`搜索商品名称`)
+					});
+			},
+		}
+	}
+</script>
+<style>
+	page {
+		height: 100%;
+	}
+</style>
+<style scoped lang="scss">
+	/deep/uni-scroll-view {
+		padding-bottom: 0 !important;
+	}
+
+	.sys-title {
+		z-index: 10;
+		position: relative;
+		height: 40px;
+		line-height: 40px;
+		font-size: 30rpx;
+		color: #333;
+		background-color: #fff;
+		// #ifdef APP-PLUS
+		text-align: center;
+		// #endif
+		// #ifdef MP
+		text-align: left;
+		padding-left: 30rpx;
+		// #endif
+	}
+
+	.sys-head {
+		background-color: #fff;
+	}
+
+	.productSort {
+		display: flex;
+		flex-direction: column;
+		//#ifdef MP
+		height: calc(100vh - var(--window-top)) !important;
+		//#endif
+		//#ifndef MP
+		height: 100vh //#endif
+	}
+
+	.productSort .header {
+		width: 100%;
+		height: 96rpx;
+		background-color: #fff;
+		border-bottom: 1rpx solid #f5f5f5;
+	}
+
+	.productSort .header .input {
+		width: 700rpx;
+		height: 60rpx;
+		background-color: #f5f5f5;
+		border-radius: 50rpx;
+		box-sizing: border-box;
+		padding: 0 25rpx;
+	}
+
+	.productSort .header .input .iconfont {
+		font-size: 35rpx;
+		color: #555;
+	}
+
+	.productSort .header .input .placeholder {
+		color: #999;
+	}
+
+	.productSort .header .input input {
+		font-size: 26rpx;
+		height: 100%;
+		width: 597rpx;
+	}
+
+	.productSort .scroll-box {
+		flex: 1;
+		overflow: hidden;
+		display: flex;
+	}
+
+	// #ifndef MP
+	uni-scroll-view {
+		padding-bottom: 100rpx;
+	}
+
+	// #endif
+
+	.productSort .aside {
+		width: 180rpx;
+		height: 100%;
+		overflow: hidden;
+		background-color: #f7f7f7;
+	}
+
+	.productSort .aside .item {
+		height: 100rpx;
+		width: 100%;
+		font-size: 26rpx;
+		color: #424242;
+		text-align: center;
+	}
+
+	.productSort .aside .item.on {
+		background-color: #fff;
+		border-left: 4rpx solid var(--view-theme);
+		width: 100%;
+		color: var(--view-theme);
+		font-weight: bold;
+	}
+
+	.productSort .conter {
+		flex: 1;
+		height: 100%;
+		overflow: hidden;
+		padding: 0 14rpx;
+		background-color: #fff;
+		position: relative;
+	}
+
+	.productSort .conter .listw {
+		padding-top: 20rpx;
+	}
+
+	.productSort .conter .listw .title {
+		height: 90rpx;
+	}
+
+	.productSort .conter .listw .title .line {
+		width: 100rpx;
+		height: 2rpx;
+		background-color: #f0f0f0;
+	}
+
+	.productSort .conter .listw .title .name {
+		font-size: 28rpx;
+		color: #333;
+		margin: 0 30rpx;
+		font-weight: bold;
+	}
+
+	.productSort .conter .list {
+		flex-wrap: wrap;
+	}
+
+	.productSort .conter .list .item {
+		width: 177rpx;
+		margin-top: 26rpx;
+	}
+
+	.productSort .conter .list .item .picture {
+		width: 120rpx;
+		height: 120rpx;
+		border-radius: 50%;
+	}
+
+	.productSort .conter .list .item .picture image {
+		width: 100%;
+		height: 100%;
+		border-radius: 50%;
+	}
+
+	.productSort .conter .list .item .name {
+		font-size: 24rpx;
+		color: #333;
+		height: 56rpx;
+		line-height: 56rpx;
+		width: 120rpx;
+		text-align: center;
+	}
+
+	.page-footer {
+		position: fixed;
+		bottom: 0;
+		z-index: 30;
+		display: flex;
+		align-items: center;
+		justify-content: space-around;
+		width: 100%;
+		height: calc(98rpx+ constant(safe-area-inset-bottom)); ///兼容 IOS<11.2/
+		height: calc(98rpx + env(safe-area-inset-bottom)); ///兼容 IOS>11.2/
+		box-sizing: border-box;
+		border-top: solid 1rpx #F3F3F3;
+		background-color: #fff;
+		box-shadow: 0px 0px 17rpx 1rpx rgba(206, 206, 206, 0.32);
+		padding-bottom: constant(safe-area-inset-bottom); ///兼容 IOS<11.2/
+		padding-bottom: env(safe-area-inset-bottom); ///兼容 IOS>11.2/
+
+		.foot-item {
+			display: flex;
+			width: max-content;
+			align-items: center;
+			justify-content: center;
+			flex-direction: column;
+			position: relative;
+
+			.count-num {
+				position: absolute;
+				display: flex;
+				justify-content: center;
+				align-items: center;
+				width: 40rpx;
+				height: 40rpx;
+				top: 0rpx;
+				right: -15rpx;
+				color: #fff;
+				font-size: 20rpx;
+				background-color: #FD502F;
+				border-radius: 50%;
+				padding: 4rpx;
+			}
+		}
+
+		.foot-item image {
+			height: 50rpx;
+			width: 50rpx;
+			text-align: center;
+			margin: 0 auto;
+		}
+
+		.foot-item .txt {
+			font-size: 24rpx;
+
+
+			&.active {}
+		}
+	}
 </style>

+ 0 - 7
template/uni-app/pages/goods_details/index.vue

@@ -462,7 +462,6 @@
 	import kefuIcon from "@/components/kefuIcon";
 	import menuIcon from "@/components/menuIcon.vue";
 	import {
-		silenceBindingSpread,
 		updateURLParameter
 	} from "@/utils";
 	import ClipboardJS from "@/plugin/clipboard/clipboard.js";
@@ -663,14 +662,8 @@
 			} else {
 				that.id = options.id;
 			}
-			//记录推广人uid
-			if (options.spid) app.globalData.spid = options.spid;
 			// #endif
 			that.getGoodsDetails();
-			// that.getCouponList(0);
-			//#ifdef H5
-			that.isLogin && silenceBindingSpread();
-			//#endif
 		},
 		onReady: function() {
 			this.isNodes++;

+ 1 - 1
template/uni-app/pages/index/diy/components/headerSerch.vue

@@ -9,7 +9,7 @@
 			<navigator url="/pages/goods/goods_search/index" class="input acea-row row-middle skeleton-rect"
 				:class="[boxStyle?'':'fillet',logoConfig?'':'on',txtStyle?'row-center':'']" hover-class="none"><text
 					class="iconfont icon-sousuo"></text>
-				{{$t(`搜索商品名称`)}}</navigator>
+				{{$t(`搜索商品`)}}</navigator>
 		</view>
 	</view>
 	<!-- #endif -->

+ 2 - 2
template/uni-app/pages/index/diy/components/liveBroadcast.vue

@@ -162,10 +162,10 @@
 				listStyle: this.dataConfig.listStyle.type,
 				mbConfig: this.dataConfig.mbConfig.val,
 				liveList: [],
-				custom_params:''
+				custom_params:'',
 				// bg:this.dataConfig.bg.color[0].item,
 				// boxShadow: this.dataConfig.boxShadow.color[0].item,
-				// limit:this.dataConfig.limit.val
+				limit:this.dataConfig.limit.val
 			};
 		},
 		created() {},

+ 96 - 91
template/uni-app/pages/index/index.vue

@@ -1,92 +1,97 @@
-<template>
-	<diy ref="diy" v-if="isDiy"></diy>
-	<visualization v-else></visualization>
-</template>
-
-<script>
-	import diy from './diy'
-	import visualization from './visualization'
-	import {
-		getShare
-	} from "@/api/public.js";
-	export default {
-		data() {
-			return {
-				isDiy: uni.getStorageSync('is_diy'),
-				shareInfo: {}
-			}
-		},
-		components: {
-			diy,
-			visualization
-		},
-		onShow() {
-			uni.$on('is_diy', (data) => {
-				this.isDiy = data
-			})
-			this.setOpenShare();
-		},
-		onHide() {
-			// this.isDiy = -1
-		},
-		methods: {
-			// 微信分享;
-			setOpenShare: function() {
-				let that = this;
-				getShare().then((res) => {
-					let data = res.data;
-					this.shareInfo = data;
-					// #ifdef H5
-					let url = location.href;
-					if (this.$store.state.app.uid) {
-						url =
-							url.indexOf("?") === -1 ?
-							url + "?spread=" + this.$store.state.app.uid :
-							url + "&spread=" + this.$store.state.app.uid;
-					}
-					if (that.$wechat.isWeixin()) {
-						let configAppMessage = {
-							desc: data.synopsis,
-							title: data.title,
-							link: url,
-							imgUrl: data.img,
-						};
-						that.$wechat.wechatEvevt(
-							["updateAppMessageShareData", "updateTimelineShareData"],
-							configAppMessage
-						);
-					}
-					// #endif
-				});
-			},
-		},
-		onReachBottom: function() {
-			if (this.isDiy) {
-				this.$refs.diy.onsollBotton()
-			}
-		},
-		// #ifdef MP
-		//发送给朋友
-		onShareAppMessage(res) {
-			// 此处的distSource为分享者的部分信息,需要传递给其他人
-			let that = this;
-			return {
-				title: this.shareInfo.title,
-				path: "/pages/index/index",
-				imageUrl: this.shareInfo.img,
-			};
-		},
-		//分享到朋友圈
-		onShareTimeline() {
-			return {
-				title: this.shareInfo.title,
-				imageUrl: this.shareInfo.img,
-			};
-		},
-		// #endif
-	}
-</script>
-
-<style>
-
+<template>
+	<diy ref="diy" v-if="isDiy"></diy>
+	<visualization v-else></visualization>
+</template>
+
+<script>
+	import diy from './diy'
+	import visualization from './visualization'
+	import Cache from '@/utils/cache';
+	import {
+		getShare
+	} from "@/api/public.js";
+	let app = getApp();
+	export default {
+		data() {
+			return {
+				isDiy: uni.getStorageSync('is_diy'),
+				shareInfo: {}
+			}
+		},
+		components: {
+			diy,
+			visualization
+		},
+		onShow() {
+			uni.$on('is_diy', (data) => {
+				this.isDiy = data
+			})
+			this.setOpenShare();
+		},
+		onHide() {
+			// this.isDiy = -1
+		},
+		methods: {
+			// 微信分享;
+			setOpenShare: function() {
+				let that = this;
+				getShare().then((res) => {
+					let data = res.data;
+					this.shareInfo = data;
+					// #ifdef H5
+					let url = location.href;
+					if (this.$store.state.app.uid) {
+						url =
+							url.indexOf("?") === -1 ?
+							url + "?spread=" + this.$store.state.app.uid :
+							url + "&spread=" + this.$store.state.app.uid;
+					}
+					if (that.$wechat.isWeixin()) {
+						let configAppMessage = {
+							desc: data.synopsis,
+							title: data.title,
+							link: url,
+							imgUrl: data.img,
+						};
+						that.$wechat.wechatEvevt(
+							["updateAppMessageShareData", "updateTimelineShareData"],
+							configAppMessage
+						);
+					}
+					// #endif
+				});
+			},
+		},
+		onReachBottom: function() {
+			if (this.isDiy) {
+				this.$refs.diy.onsollBotton()
+			}
+		},
+		// #ifdef MP
+		//发送给朋友
+		onShareAppMessage(res) {
+			// 此处的distSource为分享者的部分信息,需要传递给其他人
+			let that = this;
+			return {
+				title: this.shareInfo.title,
+				path: "/pages/index/index?spid=" + this.$store.state.app.uid || 0,
+				imageUrl: this.shareInfo.img,
+			};
+		},
+		//分享到朋友圈
+		onShareTimeline() {
+			return {
+				title: this.shareInfo.title,
+				query: {
+					spid: this.$store.state.app.uid || 0
+				},
+				imageUrl: this.shareInfo.img,
+			};
+		},
+		// #endif
+	}
+</script>
+
+<style>
+
 </style>

+ 1 - 1
template/uni-app/pages/index/visualization/components/headerSerch.vue

@@ -4,7 +4,7 @@
 		<view class="serch-wrapper row-middle">
 			<view class="logo">
 				<image class="skeleton-rect" :src="logoConfig" mode="heightFix"></image>
-				<view class="swiger">{{titleInfo.length ? titleInfo[0].val : ''}}</view>
+				<view class="swiger">{{titleInfo.length ? $t(titleInfo[0].val) : ''}}</view>
 
 			</view>
 			<view class="input acea-row row-middle fillet skeleton-rect" hover-class="none" @click="goPage"><text

+ 1 - 1
template/uni-app/pages/index/visualization/components/menus.vue

@@ -6,7 +6,7 @@
 					<view class='pictrue'>
 						<image class="skeleton-radius" :src='item.img'></image>
 					</view>
-					<view class="menu-txt">{{item.info[0].value}}</view>
+					<view class="menu-txt">{{$t(item.info[0].value)}}</view>
 				</view>
 			</block>
 		</view>

+ 2 - 2
template/uni-app/pages/index/visualization/components/newGoods.vue

@@ -7,10 +7,10 @@
 					<view class='text'>
 						<view class='name line1'>
 							<text class="iconfont icon-shoufaxinpin"></text>
-							{{titleInfo[0].val}}
+							{{$t(titleInfo[0].val)}}
 							<!-- <text class='new font-color'>NEW~</text> -->
 						</view>
-						<view class='line1 txt-btn'>{{titleInfo[1].val}}</view>
+						<view class='line1 txt-btn'>{{$t(titleInfo[1].val)}}</view>
 					</view>
 					<view class='more' @click="gopage(titleInfo[2].val)">
 						{{$t(`更多`)}}

+ 2 - 2
template/uni-app/pages/index/visualization/components/popular.vue

@@ -17,10 +17,10 @@
 				<view class='text'>
 					<view class='name line1'>
 						<text class="iconfont icon-shoufaxinpin"></text>
-						{{titleInfo[0].val}}
+						{{$t(titleInfo[0].val)}}
 						<!-- <text class='new font-color'>NEW~</text> -->
 					</view>
-					<view class='line1 txt-btn'>{{titleInfo[1].val}}</view>
+					<view class='line1 txt-btn'>{{$t(titleInfo[1].val)}}</view>
 				</view>
 				<view class='more' @click="gopage(titleInfo[2].val)">
 					{{$t(`更多`)}}

+ 2 - 2
template/uni-app/pages/index/visualization/components/promotion.vue

@@ -5,8 +5,8 @@
 				<view class='title acea-row row-between-wrapper'>
 					<view class='text'>
 						
-						<view class='name line1'><text class="iconfont icon-cuxiaodanpin"></text>{{titleInfo[0].val}}</view>
-						<view class='line1 txt-btn'>{{titleInfo[1].val}}</view>
+						<view class='name line1'><text class="iconfont icon-cuxiaodanpin"></text>{{$t(titleInfo[0].val)}}</view>
+						<view class='line1 txt-btn'>{{$t(titleInfo[1].val)}}</view>
 					</view>
 					<view class='more' @click="gopage(titleInfo[2].val)">{{$t(`更多`)}}<text class='iconfont icon-jiantou'></text>
 					</view>

+ 2 - 2
template/uni-app/pages/index/visualization/components/recommend.vue

@@ -6,9 +6,9 @@
 					<view class='text'>
 						<view class='name line1'>
 							<text class="iconfont icon-jingpintuijian1"></text>
-							{{titleInfo[0].val}}
+							{{$t(titleInfo[0].val)}}
 						</view>
-						<view class='line1 txt-btn'>{{titleInfo[1].val}}</view>
+						<view class='line1 txt-btn'>{{$t(titleInfo[1].val)}}</view>
 					</view>
 					<view class='more' @click="gopage(titleInfo[2].val)">
 						{{$t(`更多`)}}

+ 3 - 3
template/uni-app/pages/index/visualization/components/scrollBox.vue

@@ -3,8 +3,8 @@
 		<view class='index-wrapper skeleton-rect' v-if="isShow && fastList.length">
 			<view class='title acea-row row-between-wrapper'>
 				<view class='text'>
-					<view class='name line1'>{{titleInfo[0].val}}</view>
-					<view class='line1 txt-btn'>{{titleInfo[1].val}}</view>
+					<view class='name line1'>{{$t(titleInfo[0].val)}}</view>
+					<view class='line1 txt-btn'>{{$t(titleInfo[1].val)}}</view>
 				</view>
 				<navigator class='more' open-type="switchTab" :url="titleInfo[2].val">{{$t(`更多`)}}<text
 						class='iconfont icon-jiantou'></text></navigator>
@@ -17,7 +17,7 @@
 							<view class='img-box'>
 								<image :src='item.pic'></image>
 							</view>
-							<view class='pro-info line1'>{{item.cate_name}}</view>
+							<view class='pro-info line1'>{{$t(item.cate_name)}}</view>
 						</view>
 					</block>
 				</scroll-view>

+ 300 - 294
template/uni-app/pages/index/visualization/components/swiperBg.vue

@@ -1,295 +1,301 @@
-<template>
-	<view class="swiperBg" :style="{marginTop:mt +'rpx'}">
-		<view class="bag" v-if="isIframe || (imgUrls.length && isShow)">
-		</view>
-		<block v-if="isShow && imgUrls.length">
-			<view class="swiper square" v-if="imgUrls.length">
-				<swiper class="skeleton-rect" :style="'height:'+ (imageH) +'rpx;'" indicator-dots="true"
-					:autoplay="true" :circular="circular" :interval="interval" :duration="duration"
-					indicator-color="rgba(255,255,255,0.6)" indicator-active-color="#fff" :current="swiperCur"
-					@change="swiperChange">
-					<block v-for="(item,index) in imgUrls" :key="index">
-						<swiper-item class="" :class="{active:index == swiperCur}">
-							<view @click="goDetail(item)" class='slide-navigator acea-row row-between-wrapper'>
-								<image :src="item.img" class="slide-image" mode="widthFix"
-									:style="'height:'+ (imageH) +'rpx;'">
-								</image>
-							</view>
-						</swiper-item>
-					</block>
-
-				</swiper>
-			</view>
-		</block>
-		<block v-if="!isShow && isIframe && imgUrls.length && imageH">
-			<view class="swiper square" v-if="imgUrls.length && imageH" :style="'height:'+ (imageH) +'rpx;'">
-				<swiper :style="'height:'+ (imageH) +'rpx;'" indicator-dots="true" :autoplay="true" :circular="circular"
-					:interval="interval" :duration="duration" indicator-color="rgba(255,255,255,0.6)"
-					indicator-active-color="#fff">
-					<block v-for="(item,index) in imgUrls" :key="index">
-						<swiper-item>
-							<view @click="goDetail(item)" class='slide-navigator acea-row row-between-wrapper'>
-								<image :src="item.img" class="slide-image" mode="widthFix"
-									:style="'height:'+ (imageH) +'rpx;'">
-								</image>
-							</view>
-						</swiper-item>
-					</block>
-				</swiper>
-
-			</view>
-		</block>
-		<block v-if="isIframe && (!imgUrls.length || !imageH)">
-			<view class="empty-img">{{$t(`暂无图片,请上传图片`)}}</view>
-		</block>
-	</view>
-</template>
-
-<script>
-	let statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 'px';
-	let app = getApp();
-	import {
-		goPage
-	} from '@/libs/order.js'
-	export default {
-		name: 'swiperBg',
-		props: {
-			dataConfig: {
-				type: Object,
-				default: () => {}
-			},
-		},
-		watch: {
-			dataConfig: {
-				immediate: true,
-				handler(nVal, oVal) {
-					if (nVal) {
-						this.imgUrls = nVal.imgList ? nVal.imgList.list : [];
-						this.isShow = nVal.isShow ? nVal.isShow.val : true
-						uni.getImageInfo({
-							src: this.imgUrls.length ? this.imgUrls[0].img : '',
-							success: (res) => {
-								if (res && res.height > 0) {
-									this.$set(this, 'imageH',
-										res.height / res
-										.width * 690)
-								} else {
-									this.$set(this, 'imageH', 320);
-								}
-							},
-							fail: (error) => {
-								this.$set(this, 'imageH', 320);
-							}
-						})
-					}
-				}
-			},
-			imageH(nVal, oVal) {
-				let self = this
-			},
-		},
-		data() {
-			return {
-				indicatorDots: false,
-				circular: true,
-				autoplay: true,
-				interval: 4000,
-				duration: 500,
-				imgUrls: [], //图片轮播数据
-				name: this.$options.name,
-				isIframe: false,
-				mt: -55,
-				isShow: true,
-				imageH: 320,
-				swiperCur: 0,
-			};
-		},
-		created() {
-			// #ifdef MP || APP-PLUS
-			const res = uni.getSystemInfoSync()
-			const system = res.platform
-			this.statusBarHeight = res.statusBarHeight
-			if (system === 'android') {
-				this.mt = parseFloat(statusBarHeight) * 2 + 170
-			} else {
-				this.mt = parseFloat(statusBarHeight) * 2 + 168
-			}
-
-			// #endif
-			this.isIframe = app.globalData.isIframe;
-		},
-		mounted() {},
-		methods: {
-			goDetail(url) {
-				goPage().then(res => {
-					let urls = url.info[1].value
-					if (urls) {
-						if (urls.indexOf("http") != -1) {
-							// #ifdef H5
-							location.href = urls
-							// #endif
-						} else {
-							if (['/pages/goods_cate/goods_cate', '/pages/order_addcart/order_addcart',
-									'/pages/user/index'
-								].indexOf(urls) ==
-								-1) {
-								uni.navigateTo({
-									url: urls
-								})
-							} else {
-								uni.reLaunch({
-									url: urls
-								})
-							}
-						}
-					}
-				})
-			},
-			//替换安全域名
-			setDomain: function(url) {
-				url = url ? url.toString() : '';
-				//本地调试打开,生产请注销
-				if (url.indexOf("https://") > -1) return url;
-				else return url.replace('http://', 'https://');
-			},
-			swiperChange(e) {
-				// this.swiperCur = e.detail.current
-				let {
-					current,
-					source
-				} = e.detail
-				if (source === 'autoplay' || source === 'touch') {
-					//根据官方 source 来进行判断swiper的change事件是通过什么来触发的,autoplay是自动轮播。touch是用户手动滑动。其他的就是未知问题。抖动问题主要由于未知问题引起的,所以做了限制,只有在自动轮播和用户主动触发才去改变current值,达到规避了抖动bug
-					this.swiperCur = e.detail.current
-				}
-			},
-		}
-	}
-</script>
-
-<style lang="scss">
-	.swiperBg /deep/ .uni-swiper-slides {
-		overflow: hidden;
-		border-radius: 10rpx;
-	}
-
-	.swiperBg {
-		background-color: #fff;
-		position: relative;
-		margin-top: -20rpx;
-		padding-top: 4rpx;
-
-		.bag {
-			position: absolute;
-			top: 0;
-			width: 100%;
-			height: 140rpx;
-			background: linear-gradient(90deg, var(--view-main-start) 0%, var(--view-main-over) 100%);
-			border-bottom-left-radius: 40rpx;
-			border-bottom-right-radius: 40rpx;
-		}
-
-		/* #ifdef APP-PLUS */
-		/* #endif */
-		.colorBg {
-			position: absolute;
-			left: 0;
-			top: 0;
-			height: 130rpx;
-			width: 100%;
-		}
-
-		.swiper {
-			z-index: 100;
-			position: relative;
-			min-height: 200rpx;
-			padding: 0 $uni-index-margin-col;
-			/* #ifdef APP-PLUS */
-			// margin: 0rpx auto 0 auto;
-			/* #endif */
-			overflow: hidden;
-
-			/* #ifdef MP */
-			/* #endif */
-			/* 设置圆角 */
-			&.fillet {
-				border-radius: 10rpx;
-
-				image {
-					border-radius: 10rpx;
-				}
-			}
-
-			swiper,
-			.swiper-item,
-			image {
-				width: 100%;
-				overflow: hidden;
-				border-radius: 10rpx;
-			}
-
-			.slide-navigator {}
-
-			image {
-				transform: scale(1);
-				// transition: all .3s ease;
-			}
-
-			swiper-item.active {
-				image {
-					transform: scale(1);
-				}
-			}
-
-			// 圆形指示点
-			&.circular {
-				/deep/.uni-swiper-dot {
-					width: 10rpx !important;
-					height: 10rpx !important;
-					background: rgba(0, 0, 0, .4) !important
-				}
-
-				/deep/.uni-swiper-dot-active {
-					background: #fff !important
-				}
-			}
-
-			// 方形指示点
-			&.square {
-				/deep/.uni-swiper-dot {
-					width: 20rpx !important;
-					height: 5rpx !important;
-					border-radius: 3rpx;
-					background: rgba(0, 0, 0, .4) !important
-				}
-
-				/deep/.uni-swiper-dot-active {
-					background: #fff !important
-				}
-
-			}
-
-		}
-	}
-
-	.item-img image {
-		display: block;
-		width: 100%;
-		border-radius: 10rpx;
-	}
-
-	.empty-img {
-		width: 690rpx;
-		height: 300rpx;
-		border-radius: 14rpx;
-		margin: 26rpx auto 0 auto;
-		background-color: #ccc;
-		text-align: center;
-		line-height: 300rpx;
-		position: relative;
-
-		.iconfont {
-			font-size: 50rpx;
-		}
-	}
+<template>
+	<view class="swiperBg" :style="{marginTop:mt +'rpx'}">
+		<view class="bag" v-if="isIframe || (imgUrls.length && isShow)">
+		</view>
+		<block v-if="isShow && imgUrls.length">
+			<view class="swiper square" v-if="imgUrls.length">
+				<swiper class="skeleton-rect" :style="'height:'+ (imageH) +'rpx;'" indicator-dots="true"
+					:autoplay="true" :circular="circular" :interval="interval" :duration="duration"
+					indicator-color="rgba(255,255,255,0.6)" indicator-active-color="#fff" :current="swiperCur"
+					@change="swiperChange">
+					<block v-for="(item,index) in imgUrls" :key="index">
+						<swiper-item class="" :class="{active:index == swiperCur}">
+							<view @click="goDetail(item)" class='slide-navigator acea-row row-between-wrapper'>
+								<image :src="item.img" class="slide-image" mode="widthFix"
+									:style="'height:'+ (imageH) +'rpx;'">
+								</image>
+							</view>
+						</swiper-item>
+					</block>
+
+				</swiper>
+			</view>
+		</block>
+		<block v-if="!isShow && isIframe && imgUrls.length && imageH">
+			<view class="swiper square" v-if="imgUrls.length && imageH" :style="'height:'+ (imageH) +'rpx;'">
+				<swiper :style="'height:'+ (imageH) +'rpx;'" indicator-dots="true" :autoplay="true" :circular="circular"
+					:interval="interval" :duration="duration" indicator-color="rgba(255,255,255,0.6)"
+					indicator-active-color="#fff">
+					<block v-for="(item,index) in imgUrls" :key="index">
+						<swiper-item>
+							<view @click="goDetail(item)" class='slide-navigator acea-row row-between-wrapper'>
+								<image :src="item.img" class="slide-image" mode="widthFix"
+									:style="'height:'+ (imageH) +'rpx;'">
+								</image>
+							</view>
+						</swiper-item>
+					</block>
+				</swiper>
+
+			</view>
+		</block>
+		<block v-if="isIframe && (!imgUrls.length || !imageH)">
+			<view class="empty-img">{{$t(`暂无图片,请上传图片`)}}</view>
+		</block>
+	</view>
+</template>
+
+<script>
+	let statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 'px';
+	let app = getApp();
+	import {
+		goPage
+	} from '@/libs/order.js'
+	export default {
+		name: 'swiperBg',
+		props: {
+			dataConfig: {
+				type: Object,
+				default: () => {}
+			},
+		},
+		watch: {
+			dataConfig: {
+				immediate: true,
+				handler(nVal, oVal) {
+					if (nVal) {
+						this.imgUrls = nVal.imgList ? nVal.imgList.list : [];
+						this.isShow = nVal.isShow ? nVal.isShow.val : true
+						uni.getImageInfo({
+							src: this.imgUrls.length ? this.imgUrls[0].img : '',
+							success: (res) => {
+								if (res && res.height > 0) {
+									this.$set(this, 'imageH',
+										res.height / res
+										.width * 690)
+								} else {
+									this.$set(this, 'imageH', 320);
+								}
+							},
+							fail: (error) => {
+								this.$set(this, 'imageH', 320);
+							}
+						})
+					}
+				}
+			},
+			imageH(nVal, oVal) {
+				let self = this
+			},
+		},
+		data() {
+			return {
+				indicatorDots: false,
+				circular: true,
+				autoplay: true,
+				interval: 4000,
+				duration: 500,
+				imgUrls: [], //图片轮播数据
+				name: this.$options.name,
+				isIframe: false,
+				mt: -55,
+				isShow: true,
+				imageH: 320,
+				swiperCur: 0,
+			};
+		},
+		created() {
+			// #ifdef MP || APP-PLUS
+			const res = uni.getSystemInfoSync()
+			const system = res.platform
+			this.statusBarHeight = res.statusBarHeight
+			if (system === 'android') {
+				this.mt = parseFloat(statusBarHeight) * 2 + 170
+			} else {
+				this.mt = parseFloat(statusBarHeight) * 2 + 168
+			}
+
+			// #endif
+			this.isIframe = app.globalData.isIframe;
+		},
+		mounted() {},
+		methods: {
+			goDetail(url) {
+				goPage().then(res => {
+					let urls = url.info[1].value
+					if (urls) {
+						if (urls.indexOf("http") != -1) {
+							// #ifdef H5
+							location.href = urls
+							// #endif
+						} else {
+							if (['/pages/goods_cate/goods_cate', '/pages/order_addcart/order_addcart',
+									'/pages/user/index'
+								].indexOf(urls) ==
+								-1) {
+								uni.navigateTo({
+									url: urls
+								})
+							} else {
+								uni.switchTab({
+									url: urls,
+									fail() {
+										uni.reLaunch({
+											url: urls
+										})
+									}
+								})
+
+							}
+						}
+					}
+				})
+			},
+			//替换安全域名
+			setDomain: function(url) {
+				url = url ? url.toString() : '';
+				//本地调试打开,生产请注销
+				if (url.indexOf("https://") > -1) return url;
+				else return url.replace('http://', 'https://');
+			},
+			swiperChange(e) {
+				// this.swiperCur = e.detail.current
+				let {
+					current,
+					source
+				} = e.detail
+				if (source === 'autoplay' || source === 'touch') {
+					//根据官方 source 来进行判断swiper的change事件是通过什么来触发的,autoplay是自动轮播。touch是用户手动滑动。其他的就是未知问题。抖动问题主要由于未知问题引起的,所以做了限制,只有在自动轮播和用户主动触发才去改变current值,达到规避了抖动bug
+					this.swiperCur = e.detail.current
+				}
+			},
+		}
+	}
+</script>
+
+<style lang="scss">
+	.swiperBg /deep/ .uni-swiper-slides {
+		overflow: hidden;
+		border-radius: 10rpx;
+	}
+
+	.swiperBg {
+		background-color: #fff;
+		position: relative;
+		margin-top: -20rpx;
+		padding-top: 4rpx;
+
+		.bag {
+			position: absolute;
+			top: 0;
+			width: 100%;
+			height: 140rpx;
+			background: linear-gradient(90deg, var(--view-main-start) 0%, var(--view-main-over) 100%);
+			border-bottom-left-radius: 40rpx;
+			border-bottom-right-radius: 40rpx;
+		}
+
+		/* #ifdef APP-PLUS */
+		/* #endif */
+		.colorBg {
+			position: absolute;
+			left: 0;
+			top: 0;
+			height: 130rpx;
+			width: 100%;
+		}
+
+		.swiper {
+			z-index: 100;
+			position: relative;
+			min-height: 200rpx;
+			padding: 0 $uni-index-margin-col;
+			/* #ifdef APP-PLUS */
+			// margin: 0rpx auto 0 auto;
+			/* #endif */
+			overflow: hidden;
+
+			/* #ifdef MP */
+			/* #endif */
+			/* 设置圆角 */
+			&.fillet {
+				border-radius: 10rpx;
+
+				image {
+					border-radius: 10rpx;
+				}
+			}
+
+			swiper,
+			.swiper-item,
+			image {
+				width: 100%;
+				overflow: hidden;
+				border-radius: 10rpx;
+			}
+
+			.slide-navigator {}
+
+			image {
+				transform: scale(1);
+				// transition: all .3s ease;
+			}
+
+			swiper-item.active {
+				image {
+					transform: scale(1);
+				}
+			}
+
+			// 圆形指示点
+			&.circular {
+				/deep/.uni-swiper-dot {
+					width: 10rpx !important;
+					height: 10rpx !important;
+					background: rgba(0, 0, 0, .4) !important
+				}
+
+				/deep/.uni-swiper-dot-active {
+					background: #fff !important
+				}
+			}
+
+			// 方形指示点
+			&.square {
+				/deep/.uni-swiper-dot {
+					width: 20rpx !important;
+					height: 5rpx !important;
+					border-radius: 3rpx;
+					background: rgba(0, 0, 0, .4) !important
+				}
+
+				/deep/.uni-swiper-dot-active {
+					background: #fff !important
+				}
+
+			}
+
+		}
+	}
+
+	.item-img image {
+		display: block;
+		width: 100%;
+		border-radius: 10rpx;
+	}
+
+	.empty-img {
+		width: 690rpx;
+		height: 300rpx;
+		border-radius: 14rpx;
+		margin: 26rpx auto 0 auto;
+		background-color: #ccc;
+		text-align: center;
+		line-height: 300rpx;
+		position: relative;
+
+		.iconfont {
+			font-size: 50rpx;
+		}
+	}
 </style>

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1380 - 1371
template/uni-app/pages/order_addcart/order_addcart.vue


+ 0 - 4
template/uni-app/pages/points_mall/integral_goods_details.vue

@@ -142,9 +142,6 @@
 	import {
 		toLogin
 	} from '@/libs/login.js';
-	import {
-		silenceBindingSpread
-	} from "@/utils";
 	import {
 		getUserInfo
 	} from '@/api/user.js';
@@ -270,7 +267,6 @@
 					//res.windowHeight:获取整个窗口高度为px,*2为rpx;98为头部占据的高度;
 				},
 			});
-			this.isLogin && silenceBindingSpread();
 			// #ifdef H5
 			that.navH = 96;
 			// #endif

+ 1 - 7
template/uni-app/pages/user/index.vue

@@ -20,16 +20,10 @@
 							<view>
 								<!-- 注释这个是加的bnt -->
 								<!-- #ifdef H5 -->
-								<button class="bntImg" v-if="userInfo.is_complete == 0 && isWeixin"
+								<!-- <button class="bntImg" v-if="userInfo.is_complete == 0 && isWeixin"
 									@click="getWechatuserinfo">
 									<image class="avatar" src='/static/images/f.png'></image>
 									<view class="avatarName">{{$t('获取头像')}}</view>
-								</button>
-								<!-- #endif -->
-								<!-- #ifdef MP -->
-								<!-- <button class="bntImg" v-if="userInfo.is_complete == 0" @tap="getUserProfile">
-									<image class="avatar" src='/static/images/f.png'></image>
-									<view class="avatarName">{{$t('获取头像')}}</view>
 								</button> -->
 								<!-- #endif -->
 								<!-- #ifndef APP-PLUS -->

+ 1 - 1
template/uni-app/pages/users/components/login_mobile/routine_phone.vue

@@ -55,7 +55,7 @@
 			// 小程序获取手机号码
 			getphonenumber(e) {
 				uni.showLoading({
-					title: this.$t(`加载中`)
+					title: this.$t(`正在登录中`)
 				});
 				Routine.getCode()
 					.then(code => {

+ 1 - 0
template/uni-app/pages/users/login/index.vue

@@ -563,6 +563,7 @@
 						captchaVerification: data.captchaVerification
 					})
 					.then(res => {
+						this.sendCode()
 						that.$util.Tips({
 							title: res.msg
 						});

+ 482 - 473
template/uni-app/pages/users/user_address_list/index.vue

@@ -1,476 +1,485 @@
-<template>
-	<view :style="colorStyle">
-		<view class='address-management' :class='addressList.length < 1 && page > 1 ? "fff":""'>
-			<view class='line'>
-				<image src='../../../static/images/line.jpg' v-if="addressList.length"></image>
-			</view>
-			<radio-group class="radio-group" @change="radioChange" v-if="addressList.length">
-				<view class='item' v-for="(item,index) in addressList" :key="index">
-					<view class='address' @click='goOrder(item.id)'>
-						<view class='consignee'>{{$t(`收货人`)}}:{{item.real_name}}<text class='phone'>{{item.phone}}</text></view>
-						<view>{{$t(`收货地址`)}}:{{item.province}}{{item.city}}{{item.district}}{{item.detail}}</view>
-					</view>
-					<view class='operation acea-row row-between-wrapper'>
-						<!-- #ifndef MP -->
-						<radio class="radio" :value="index.toString()" :checked="item.is_default ? true : false">
-							<text>{{$t(`设为默认`)}}</text>
-						</radio>
-						<!-- #endif -->
-						<!-- #ifdef MP -->
-						<radio class="radio" :value="index" :checked="item.is_default ? true : false">
-							<text>{{$t(`设为默认`)}}</text>
-						</radio>
-						<!-- #endif -->
-						<view class='acea-row row-middle'>
-							<view @click='editAddress(item.id)'><text class='iconfont icon-bianji'></text>{{$t(`编辑`)}}</view>
-							<view @click='delAddress(index)'><text class='iconfont icon-shanchu'></text>{{$t(`删除`)}}</view>
-						</view>
-					</view>
-				</view>
-			</radio-group>
-			<view class='loadingicon acea-row row-center-wrapper' v-if="addressList.length">
-				<text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{loadTitle}}
-			</view>
-			<view class='noCommodity' v-if="addressList.length < 1 && page > 1">
-				<view class='pictrue'>
-					<image :src="imgHost + '/statics/images/noAddress.png'"></image>
-				</view>
-			</view>
-			<view style='height:120rpx;'></view>
-			<view class='footer acea-row row-between-wrapper'>
-				<!-- #ifdef APP-PLUS -->
-				<view class='addressBnt on' @click='addAddress'><text
-						class='iconfont icon-tianjiadizhi'></text>{{$t(`添加新地址`)}}</view>
-				<!-- #endif -->
-				<!-- #ifdef MP-->
-				<view class='addressBnt wxbnt' @click='addAddress'><text
-						class='iconfont icon-tianjiadizhi'></text>{{$t(`添加新地址`)}}</view>
-				<view class='addressBnt' @click='getWxAddress'><text class='iconfont icon-weixin2'></text>{{$t(`导入微信地址`)}}
-				</view>
-				<!-- #endif -->
-				<!-- #ifdef H5-->
-				<view class='addressBnt' :class="this.$wechat.isWeixin()?'wxbnt':'on'" @click='addAddress'><text
-						class='iconfont icon-tianjiadizhi'></text>{{$t(`添加新地址`)}}</view>
-				<view class=""></view>		
-				<view class='addressBnt' @click='getAddress' v-if="this.$wechat.isWeixin()"><text
-						class='iconfont icon-weixin2'></text>{{$t(`导入微信地址`)}}</view>
-				<!-- #endif -->
-			</view>
-		</view>
-		<!-- #ifdef MP -->
-		<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
-		<!-- #endif -->
-		<!-- #ifndef MP -->
-		<home></home>
-		<!-- #endif -->
-	</view>
-</template>
-
-<script>
-	import {
-		getAddressList,
-		setAddressDefault,
-		delAddress,
-		editAddress,
-		postAddress
-	} from '@/api/user.js';
-	import {
-		toLogin
-	} from '@/libs/login.js';
-	import {
-		mapGetters
-	} from "vuex";
-	// #ifdef MP
-	import authorize from '@/components/Authorize';
-	// #endif
-	import home from '@/components/home';
-	import colors from '@/mixins/color.js';
-	import {HTTP_REQUEST_URL} from '@/config/app';
-	export default {
-		components: {
-			// #ifdef MP
-			authorize,
-			// #endif
-			home
-		},
-		mixins:[colors],
-		data() {
-			return {
-				imgHost:HTTP_REQUEST_URL,
-				addressList: [],
-				cartId: '',
-				pinkId: 0,
-				couponId: 0,
-				loading: false,
-				loadend: false,
-				loadTitle: this.$t(`加载更多`),
-				page: 1,
-				limit: 20,
-				isAuto: false, //没有授权的不会自动授权
-				isShowAuth: false, //是否隐藏授权
-				news: '',
-				noCoupon: 0
-			};
-		},
-		computed: mapGetters(['isLogin']),
-		onLoad(options) {
-			if (this.isLogin) {
-				this.cartId = options.cartId || '';
-				this.noCoupon = options.noCoupon || 0;
-				this.pinkId = options.pinkId || 0;
-				this.couponId = options.couponId || 0;
-				this.news = options.news || 0;
-				this.getAddressList(true);
-			} else {
-				toLogin();
-			}
-		},
-		onShow: function() {
-			let that = this;
-			that.getAddressList(true);
-		},
-		methods: {
-			onLoadFun: function() {
-				this.getAddressList();
-			},
-			// 授权关闭
-			authColse: function(e) {
-				this.isShowAuth = e
-			},
-			/*
-			 * 导入微信地址(小程序)
-			 */
-			getWxAddress: function() {
+<template>
+	<view :style="colorStyle">
+		<view class='address-management' :class='addressList.length < 1 && page > 1 ? "fff":""'>
+			<view class='line'>
+				<image src='../../../static/images/line.jpg' v-if="addressList.length"></image>
+			</view>
+			<radio-group class="radio-group" @change="radioChange" v-if="addressList.length">
+				<view class='item' v-for="(item,index) in addressList" :key="index">
+					<view class='address' @click='goOrder(item.id)'>
+						<view class='consignee'>{{$t(`收货人`)}}:{{item.real_name}}<text
+								class='phone'>{{item.phone}}</text></view>
+						<view>{{$t(`收货地址`)}}:{{item.province}}{{item.city}}{{item.district}}{{item.detail}}</view>
+					</view>
+					<view class='operation acea-row row-between-wrapper'>
+						<!-- #ifndef MP -->
+						<radio class="radio" :value="index.toString()" :checked="item.is_default ? true : false">
+							<text>{{$t(`设为默认`)}}</text>
+						</radio>
+						<!-- #endif -->
+						<!-- #ifdef MP -->
+						<radio class="radio" :value="index" :checked="item.is_default ? true : false">
+							<text>{{$t(`设为默认`)}}</text>
+						</radio>
+						<!-- #endif -->
+						<view class='acea-row row-middle'>
+							<view @click='editAddress(item.id)'><text class='iconfont icon-bianji'></text>{{$t(`编辑`)}}
+							</view>
+							<view @click='delAddress(index)'><text class='iconfont icon-shanchu'></text>{{$t(`删除`)}}
+							</view>
+						</view>
+					</view>
+				</view>
+			</radio-group>
+			<view class='loadingicon acea-row row-center-wrapper' v-if="addressList.length">
+				<text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{loadTitle}}
+			</view>
+			<view class='noCommodity' v-if="addressList.length < 1 && page > 1">
+				<view class='pictrue'>
+					<image :src="imgHost + '/statics/images/noAddress.png'"></image>
+				</view>
+			</view>
+			<view style='height:120rpx;'></view>
+			<view class='footer acea-row row-between-wrapper'>
+				<!-- #ifdef APP-PLUS -->
+				<view class='addressBnt on' @click='addAddress'><text
+						class='iconfont icon-tianjiadizhi'></text>{{$t(`添加新地址`)}}</view>
+				<!-- #endif -->
+				<!-- #ifdef MP-->
+				<view class='addressBnt wxbnt' @click='addAddress'><text
+						class='iconfont icon-tianjiadizhi'></text>{{$t(`添加新地址`)}}</view>
+				<view class='addressBnt' @click='getWxAddress'><text
+						class='iconfont icon-weixin2'></text>{{$t(`导入微信地址`)}}
+				</view>
+				<!-- #endif -->
+				<!-- #ifdef H5-->
+				<view class='addressBnt' :class="this.$wechat.isWeixin()?'wxbnt':'on'" @click='addAddress'><text
+						class='iconfont icon-tianjiadizhi'></text>{{$t(`添加新地址`)}}</view>
+				<view class=""></view>
+				<view class='addressBnt' @click='getAddress' v-if="this.$wechat.isWeixin()"><text
+						class='iconfont icon-weixin2'></text>{{$t(`导入微信地址`)}}</view>
+				<!-- #endif -->
+			</view>
+		</view>
+		<!-- #ifdef MP -->
+		<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
+		<!-- #endif -->
+		<!-- #ifndef MP -->
+		<home></home>
+		<!-- #endif -->
+	</view>
+</template>
+
+<script>
+	import {
+		getAddressList,
+		setAddressDefault,
+		delAddress,
+		editAddress,
+		postAddress
+	} from '@/api/user.js';
+	import {
+		toLogin
+	} from '@/libs/login.js';
+	import {
+		mapGetters
+	} from "vuex";
+	// #ifdef MP
+	import authorize from '@/components/Authorize';
+	// #endif
+	import home from '@/components/home';
+	import colors from '@/mixins/color.js';
+	import {
+		HTTP_REQUEST_URL
+	} from '@/config/app';
+	export default {
+		components: {
+			// #ifdef MP
+			authorize,
+			// #endif
+			home
+		},
+		mixins: [colors],
+		data() {
+			return {
+				imgHost: HTTP_REQUEST_URL,
+				addressList: [],
+				cartId: '',
+				pinkId: 0,
+				couponId: 0,
+				loading: false,
+				loadend: false,
+				loadTitle: this.$t(`加载更多`),
+				page: 1,
+				limit: 20,
+				isAuto: false, //没有授权的不会自动授权
+				isShowAuth: false, //是否隐藏授权
+				news: '',
+				noCoupon: 0
+			};
+		},
+		computed: mapGetters(['isLogin']),
+		onLoad(options) {
+			if (this.isLogin) {
+				this.cartId = options.cartId || '';
+				this.noCoupon = options.noCoupon || 0;
+				this.pinkId = options.pinkId || 0;
+				this.couponId = options.couponId || 0;
+				this.news = options.news || 0;
+				this.getAddressList(true);
+			} else {
+				toLogin();
+			}
+		},
+		onShow: function() {
+			let that = this;
+			that.getAddressList(true);
+		},
+		methods: {
+			onLoadFun: function() {
+				this.getAddressList();
+			},
+			// 授权关闭
+			authColse: function(e) {
+				this.isShowAuth = e
+			},
+			/*
+			 * 导入微信地址(小程序)
+			 */
+			getWxAddress: function() {
 				let that = this;
-				uni.authorize({
-					scope: 'scope.address',
-					success: function(res) {
-						uni.chooseAddress({
-							success: function(res) {
-								let addressP = {};
-								addressP.province = res.provinceName;
-								addressP.city = res.cityName;
+				console.log('111')
+				uni.authorize({
+					scope: 'scope.address',
+					success: function(res) {
+						uni.chooseAddress({
+							success: function(res) {
+								let addressP = {};
+								addressP.province = res.provinceName;
+								addressP.city = res.cityName;
 								addressP.district = res.countyName;
-								editAddress({
-									address: addressP,
-									is_default: 1,
-									real_name: res.userName,
-									post_code: res.postalCode,
-									phone: res.telNumber,
-									detail: res.detailInfo,
-									id: 0,
-									type: 1
-								}).then(res => {
-									that.$util.Tips({
-										title: that.$t(`添加成功`),
-										icon: 'success'
-									}, function() {
-										that.getAddressList(true);
-									});
-								}).catch(err => {
-									return that.$util.Tips({
-										title: err
-									});
-								});
-							},
-							fail: function(res) {
-								if (res.errMsg == 'chooseAddress:cancel') return that.$util
-									.Tips({
-										title: that.$t(`取消选择`)
-									});
-							},
-						})
-					},
-					fail: function(res) {
-						uni.showModal({
-							title: that.$t(`您已拒绝导入微信地址权限`),
-							content: that.$t(`是否进入权限管理,调整授权?`),
-							success(res) {
-								if (res.confirm) {
-									uni.openSetting({
-										success: function(res) {}
-									});
-								} else if (res.cancel) {
-									return that.$util.Tips({
-										title: that.$t(`已取消!`)
-									});
-								}
-							}
-						})
-					}
-				})
-			},
-			/*
-			 * 导入微信地址(公众号)
-			 */
-			getAddress() {
-				let that = this;
-				that.$wechat.openAddress().then(userInfo => {
-					// open();
-					editAddress({
-							real_name: userInfo.userName,
-							phone: userInfo.telNumber,
-							address: {
-								province: userInfo.provinceName,
-								city: userInfo.cityName,
-								district: userInfo.countryName
-							},
-							detail: userInfo.detailInfo,
-							post_code: userInfo.postalCode,
-							is_default: 1,
-							type: 1
-						})
-						.then(() => {
-							that.$util.Tips({
-								title: that.$t(`添加成功`),
-								icon: 'success'
-							}, function() {
-								// close();
-								that.getAddressList(true);
-							});
-						})
-						.catch(err => {
-							// close();
-							return that.$util.Tips({
-								title: err || that.$t(`添加失败`)
-							});
-						});
-				});
-			},
-			/**
-			 * 获取地址列表
-			 * 
-			 */
-			getAddressList: function(isPage) {
-				let that = this;
-				if (isPage) {
-					that.loadend = false;
-					that.page = 1;
-					that.$set(that, 'addressList', []);
-				};
-				if (that.loading) return;
-				if (that.loadend) return;
-				that.loading = true;
-				that.loadTitle = '';
-				getAddressList({
-					page: that.page,
-					limit: that.limit
-				}).then(res => {
-					let list = res.data;
-					let loadend = list.length < that.limit;
-					that.addressList = that.$util.SplitArray(list, that.addressList);
-					that.$set(that, 'addressList', that.addressList);
-					that.loadend = loadend;
-					that.loadTitle = loadend ? that.$t(`我也是有底线的`) : that.$t(`加载更多`);
-					that.page = that.page + 1;
-					that.loading = false;
-				}).catch(err => {
-					that.loading = false;
-					that.loadTitle = that.$t(`加载更多`);
-				});
-			},
-			/**
-			 * 设置默认地址
-			 */
-			radioChange: function(e) {
-				let index = parseInt(e.detail.value),
-					that = this;
-				let address = this.addressList[index];
-				if (address == undefined) return that.$util.Tips({
-					title: that.$t(`您设置的默认地址不存在!`)
-				});
-				setAddressDefault(address.id).then(res => {
-					for (let i = 0, len = that.addressList.length; i < len; i++) {
-						if (i == index) that.addressList[i].is_default = true;
-						else that.addressList[i].is_default = false;
-					}
-					that.$util.Tips({
-						title: that.$t(`设置成功`),
-						icon: 'success'
-					}, function() {
-						that.$set(that, 'addressList', that.addressList);
-					});
-				}).catch(err => {
-					return that.$util.Tips({
-						title: err
-					});
-				});
-			},
-			/**
-			 * 编辑地址
-			 */
-			editAddress: function(id) {
-				let cartId = this.cartId,
-					pinkId = this.pinkId,
-					couponId = this.couponId;
-				this.cartId = '';
-				this.pinkId = '';
-				this.couponId = '';
-				uni.navigateTo({
-					url: '/pages/users/user_address/index?id=' + id + '&cartId=' + cartId + '&pinkId=' +
-						pinkId + '&couponId=' +
-						couponId + '&new=' + this.news
-				})
-			},
-			/**
-			 * 删除地址
-			 */
-			delAddress: function(index) {
-				let that = this,
-					address = this.addressList[index];
-				if (address == undefined) return that.$util.Tips({
-					title: that.$t(`您删除的地址不存在!`)
-				});
-				delAddress(address.id).then(res => {
-					that.$util.Tips({
-						title: that.$t(`删除成功`),
-						icon: 'success'
-					}, function() {
-						that.addressList.splice(index, 1);
-						that.$set(that, 'addressList', that.addressList);
-					});
-				}).catch(err => {
-					return that.$util.Tips({
-						title: err
-					});
-				});
-			},
-			/**
-			 * 新增地址
-			 */
-			addAddress: function() {
-				let cartId = this.cartId,
-					pinkId = this.pinkId,
-					couponId = this.couponId;
-				this.cartId = '';
-				this.pinkId = '';
-				this.couponId = '';
-				uni.navigateTo({
-					url: '/pages/users/user_address/index?cartId=' + cartId + '&pinkId=' + pinkId +
-						'&couponId=' + couponId + '&new=' + this.news
-				})
-			},
-			goOrder: function(id) {
-				let cartId = '';
-				let pinkId = '';
-				let couponId = '';
-				if (this.cartId && id) {
-					cartId = this.cartId;
-					pinkId = this.pinkId;
-					couponId = this.couponId;
-					this.cartId = '';
-					this.pinkId = '';
-					this.couponId = '';
-					uni.redirectTo({
-						url: '/pages/goods/order_confirm/index?is_address=1&new=' + this.news + '&cartId=' +
-							cartId + '&addressId=' + id + '&pinkId=' +
-							pinkId + '&couponId=' + couponId + '&noCoupon=' + this.noCoupon
-							
-					})
-				}
-			}
-		},
-		onReachBottom: function() {
-			this.getAddressList();
-		}
-	}
-</script>
-
-<style>
-	.address-management.fff {
-		background-color: #fff;
-		height: 1300rpx
-	}
-
-	.address-management .line {
-		width: 100%;
-		height: 3rpx;
-	}
-
-	.address-management .line image {
-		width: 100%;
-		height: 100%;
-		display: block;
-	}
-
-	.address-management .item {
-		background-color: #fff;
-		padding: 0 30rpx;
-		margin-bottom: 12rpx;
-	}
-
-	.address-management .item .address {
-		padding: 30rpx 0;
-		border-bottom: 1rpx solid #eee;
-		font-size: 28rpx;
-		color: #282828;
-	}
-
-	.address-management .item .address .consignee {
-		font-size: 28rpx;
-		font-weight: bold;
-		margin-bottom: 8rpx;
-	}
-
-	.address-management .item .address .consignee .phone {
-		margin-left: 25rpx;
-	}
-
-	.address-management .item .operation {
-		height: 83rpx;
-		font-size: 28rpx;
-		color: #282828;
-	}
-
-	.address-management .item .operation .radio text {
-		margin-left: 13rpx;
-	}
-
-	.address-management .item .operation .iconfont {
-		color: #2c2c2c;
-		font-size: 35rpx;
-		vertical-align: -2rpx;
-		margin-right: 10rpx;
-	}
-
-	.address-management .item .operation .iconfont.icon-shanchu {
-		margin-left: 40rpx;
-		font-size: 38rpx;
-	}
-
-	.address-management .footer {
-		position: fixed;
-		width: 100%;
-		background-color: #fff;
-		bottom: 0;
-		height: 106rpx;
-		padding: 0 30rpx;
-		box-sizing: border-box;
-	}
-
-	.address-management .footer .addressBnt {
-		width: 330rpx;
-		height: 76rpx;
-		border-radius: 50rpx;
-		text-align: center;
-		line-height: 76rpx;
-		font-size: 30rpx;
-		color: #fff;
-		background-color: var(--view-theme);
-	}
-
-	.address-management .footer .addressBnt.on {
-		width: 690rpx;
-		margin: 0 auto;
-	}
-
-	.address-management .footer .addressBnt .iconfont {
-		font-size: 35rpx;
-		margin-right: 8rpx;
-		vertical-align: -1rpx;
-	}
-
-	.address-management .footer .addressBnt.wxbnt {
-		background-color: #FE960F;
-	}
+								
+								editAddress({
+									address: addressP,
+									is_default: 1,
+									real_name: res.userName,
+									post_code: res.postalCode,
+									phone: res.telNumber,
+									detail: res.detailInfo,
+									id: 0,
+									type: 1
+								}).then(res => {
+									that.$util.Tips({
+										title: that.$t(`添加成功`),
+										icon: 'success'
+									}, function() {
+										that.getAddressList(true);
+									});
+								}).catch(err => {
+									return that.$util.Tips({
+										title: err
+									});
+								});
+							},
+							fail: function(err) {
+								console.log(err)
+								if (err.errMsg == 'chooseAddress:cancel') return that.$util
+									.Tips({
+										title: that.$t(`取消选择`)
+									});
+							},
+						})
+					},
+					fail: function(res) {
+						uni.showModal({
+							title: that.$t(`您已拒绝导入微信地址权限`),
+							content: that.$t(`是否进入权限管理,调整授权?`),
+							success(res) {
+								if (res.confirm) {
+									uni.openSetting({
+										success: function(res) {}
+									});
+								} else if (res.cancel) {
+									return that.$util.Tips({
+										title: that.$t(`已取消!`)
+									});
+								}
+							}
+						})
+					}
+				})
+			},
+			/*
+			 * 导入微信地址(公众号)
+			 */
+			getAddress() {
+				let that = this;
+				that.$wechat.openAddress().then(userInfo => {
+					// open();
+					editAddress({
+							real_name: userInfo.userName,
+							phone: userInfo.telNumber,
+							address: {
+								province: userInfo.provinceName,
+								city: userInfo.cityName,
+								district: userInfo.countryName
+							},
+							detail: userInfo.detailInfo,
+							post_code: userInfo.postalCode,
+							is_default: 1,
+							type: 1
+						})
+						.then(() => {
+							that.$util.Tips({
+								title: that.$t(`添加成功`),
+								icon: 'success'
+							}, function() {
+								// close();
+								that.getAddressList(true);
+							});
+						})
+						.catch(err => {
+							// close();
+							return that.$util.Tips({
+								title: err || that.$t(`添加失败`)
+							});
+						});
+				});
+			},
+			/**
+			 * 获取地址列表
+			 * 
+			 */
+			getAddressList: function(isPage) {
+				let that = this;
+				if (isPage) {
+					that.loadend = false;
+					that.page = 1;
+					that.$set(that, 'addressList', []);
+				};
+				if (that.loading) return;
+				if (that.loadend) return;
+				that.loading = true;
+				that.loadTitle = '';
+				getAddressList({
+					page: that.page,
+					limit: that.limit
+				}).then(res => {
+					let list = res.data;
+					let loadend = list.length < that.limit;
+					that.addressList = that.$util.SplitArray(list, that.addressList);
+					that.$set(that, 'addressList', that.addressList);
+					that.loadend = loadend;
+					that.loadTitle = loadend ? that.$t(`我也是有底线的`) : that.$t(`加载更多`);
+					that.page = that.page + 1;
+					that.loading = false;
+				}).catch(err => {
+					that.loading = false;
+					that.loadTitle = that.$t(`加载更多`);
+				});
+			},
+			/**
+			 * 设置默认地址
+			 */
+			radioChange: function(e) {
+				let index = parseInt(e.detail.value),
+					that = this;
+				let address = this.addressList[index];
+				if (address == undefined) return that.$util.Tips({
+					title: that.$t(`您设置的默认地址不存在!`)
+				});
+				setAddressDefault(address.id).then(res => {
+					for (let i = 0, len = that.addressList.length; i < len; i++) {
+						if (i == index) that.addressList[i].is_default = true;
+						else that.addressList[i].is_default = false;
+					}
+					that.$util.Tips({
+						title: that.$t(`设置成功`),
+						icon: 'success'
+					}, function() {
+						that.$set(that, 'addressList', that.addressList);
+					});
+				}).catch(err => {
+					return that.$util.Tips({
+						title: err
+					});
+				});
+			},
+			/**
+			 * 编辑地址
+			 */
+			editAddress: function(id) {
+				let cartId = this.cartId,
+					pinkId = this.pinkId,
+					couponId = this.couponId;
+				this.cartId = '';
+				this.pinkId = '';
+				this.couponId = '';
+				uni.navigateTo({
+					url: '/pages/users/user_address/index?id=' + id + '&cartId=' + cartId + '&pinkId=' +
+						pinkId + '&couponId=' +
+						couponId + '&new=' + this.news
+				})
+			},
+			/**
+			 * 删除地址
+			 */
+			delAddress: function(index) {
+				let that = this,
+					address = this.addressList[index];
+				if (address == undefined) return that.$util.Tips({
+					title: that.$t(`您删除的地址不存在!`)
+				});
+				delAddress(address.id).then(res => {
+					that.$util.Tips({
+						title: that.$t(`删除成功`),
+						icon: 'success'
+					}, function() {
+						that.addressList.splice(index, 1);
+						that.$set(that, 'addressList', that.addressList);
+					});
+				}).catch(err => {
+					return that.$util.Tips({
+						title: err
+					});
+				});
+			},
+			/**
+			 * 新增地址
+			 */
+			addAddress: function() {
+				let cartId = this.cartId,
+					pinkId = this.pinkId,
+					couponId = this.couponId;
+				this.cartId = '';
+				this.pinkId = '';
+				this.couponId = '';
+				uni.navigateTo({
+					url: '/pages/users/user_address/index?cartId=' + cartId + '&pinkId=' + pinkId +
+						'&couponId=' + couponId + '&new=' + this.news
+				})
+			},
+			goOrder: function(id) {
+				let cartId = '';
+				let pinkId = '';
+				let couponId = '';
+				if (this.cartId && id) {
+					cartId = this.cartId;
+					pinkId = this.pinkId;
+					couponId = this.couponId;
+					this.cartId = '';
+					this.pinkId = '';
+					this.couponId = '';
+					uni.redirectTo({
+						url: '/pages/goods/order_confirm/index?is_address=1&new=' + this.news + '&cartId=' +
+							cartId + '&addressId=' + id + '&pinkId=' +
+							pinkId + '&couponId=' + couponId + '&noCoupon=' + this.noCoupon
+
+					})
+				}
+			}
+		},
+		onReachBottom: function() {
+			this.getAddressList();
+		}
+	}
+</script>
+
+<style>
+	.address-management.fff {
+		background-color: #fff;
+		height: 1300rpx
+	}
+
+	.address-management .line {
+		width: 100%;
+		height: 3rpx;
+	}
+
+	.address-management .line image {
+		width: 100%;
+		height: 100%;
+		display: block;
+	}
+
+	.address-management .item {
+		background-color: #fff;
+		padding: 0 30rpx;
+		margin-bottom: 12rpx;
+	}
+
+	.address-management .item .address {
+		padding: 30rpx 0;
+		border-bottom: 1rpx solid #eee;
+		font-size: 28rpx;
+		color: #282828;
+	}
+
+	.address-management .item .address .consignee {
+		font-size: 28rpx;
+		font-weight: bold;
+		margin-bottom: 8rpx;
+	}
+
+	.address-management .item .address .consignee .phone {
+		margin-left: 25rpx;
+	}
+
+	.address-management .item .operation {
+		height: 83rpx;
+		font-size: 28rpx;
+		color: #282828;
+	}
+
+	.address-management .item .operation .radio text {
+		margin-left: 13rpx;
+	}
+
+	.address-management .item .operation .iconfont {
+		color: #2c2c2c;
+		font-size: 35rpx;
+		vertical-align: -2rpx;
+		margin-right: 10rpx;
+	}
+
+	.address-management .item .operation .iconfont.icon-shanchu {
+		margin-left: 40rpx;
+		font-size: 38rpx;
+	}
+
+	.address-management .footer {
+		position: fixed;
+		width: 100%;
+		background-color: #fff;
+		bottom: 0;
+		height: 106rpx;
+		padding: 0 30rpx;
+		box-sizing: border-box;
+	}
+
+	.address-management .footer .addressBnt {
+		width: 330rpx;
+		height: 76rpx;
+		border-radius: 50rpx;
+		text-align: center;
+		line-height: 76rpx;
+		font-size: 30rpx;
+		color: #fff;
+		background-color: var(--view-theme);
+	}
+
+	.address-management .footer .addressBnt.on {
+		width: 690rpx;
+		margin: 0 auto;
+	}
+
+	.address-management .footer .addressBnt .iconfont {
+		font-size: 35rpx;
+		margin-right: 8rpx;
+		vertical-align: -1rpx;
+	}
+
+	.address-management .footer .addressBnt.wxbnt {
+		background-color: #FE960F;
+	}
 </style>

+ 17 - 12
template/uni-app/pages/users/user_info/index.vue

@@ -43,7 +43,7 @@
 					</view>
 					<view class='item acea-row row-between-wrapper'>
 						<view>{{$t(`昵称`)}}</view>
-						<view class='input'><input type='nickname' name='nickname' :value='userInfo.nickname'></input>
+						<view class='input'><input type='nickname' name='nickname' :maxlength="16" :value='userInfo.nickname'></input>
 						</view>
 					</view>
 					<view class='item acea-row row-between-wrapper'>
@@ -254,12 +254,15 @@
 			},
 			bindPickerChange(e, item) {
 				this.setIndex = e.detail.value
-				uni.setStorageSync('locale', this.array[this.setIndex].value);
+				Cache.set('locale', this.array[this.setIndex].value)
 				getLangJson().then(res => {
-					Cache.set('localeJson', res.data, 600)
-					this.$i18n.locale = this.array[this.setIndex].value;
-					this.$i18n.setLocaleMessage(this.array[this.setIndex].value, res.data[this
-						.array[this.setIndex].value]);
+					uni.setStorageSync('localeJson', res.data);
+					this.$i18n.setLocaleMessage(this.array[this.setIndex].value, res.data[this.array[
+						this.setIndex].value]);
+					this.$nextTick(e => {
+						this.$i18n.locale = this.array[this.setIndex].value;
+					})
+					Cache.set('localeSet', true, 600)
 				})
 			},
 
@@ -463,7 +466,6 @@
 				const {
 					avatarUrl
 				} = e.detail
-				console.log(avatarUrl)
 				this.$util.uploadImgs('upload/image', avatarUrl, (res) => {
 					this.userInfo.avatar = res.data.url
 				}, (err) => {
@@ -611,7 +613,7 @@
 		padding: 30rpx 30rpx 30rpx 0;
 		border-bottom: 1rpx solid #f2f2f2;
 		margin-left: 30rpx;
-		font-size: 32rpx;
+		font-size: 28rpx;
 		color: #282828;
 	}
 
@@ -636,17 +638,20 @@
 	}
 
 	.personal-data .list .item .input {
-		width: 415rpx;
+		max-width: 400rpx;
 		text-align: right;
-		color: #868686;
+		color: #868686;
+		.icon-suozi{
+			margin-left: 10rpx;
+		}
 	}
 
 	.personal-data .list .item .input .id {
-		width: 365rpx;
+		// width: 180rpx;
 	}
 
 	.personal-data .list .item .input .iconfont {
-		font-size: 35rpx;
+		font-size: 24rpx;
 	}
 
 	.personal-data .modifyBnt {

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 456 - 452
template/uni-app/pages/users/user_money/index.vue


+ 17 - 6
template/uni-app/pages/users/wechat_login/index.vue

@@ -216,17 +216,28 @@
 			userLogin() {
 				Routine.getCode()
 					.then(code => {
+						uni.showLoading({
+							title: this.$t(`正在登录中`)
+						});
 						authLogin({
 							code,
 							spread_spid: app.globalData.spid,
 							spread_code: app.globalData.code
 						}).then(res => {
-							let time = res.data.expires_time - this.$Cache.time();
-							this.$store.commit('LOGIN', {
-								token: res.data.token,
-								time: time
-							});
-							this.getUserInfo()
+							if (res.data.key !== undefined && res.data.key) {
+								uni.hideLoading();
+								this.authKey = res.data.key;
+								this.isPhoneBox = true;
+							} else {
+								uni.hideLoading();
+								let time = res.data.expires_time - this.$Cache.time();
+								this.$store.commit('LOGIN', {
+									token: res.data.token,
+									time: time
+								});
+								this.getUserInfo()
+							}
+
 						})
 					})
 					.catch(err => {

+ 96 - 96
template/uni-app/store/modules/app.js

@@ -1,97 +1,97 @@
-// +----------------------------------------------------------------------
-// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
-// +----------------------------------------------------------------------
-// | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved.
-// +----------------------------------------------------------------------
-// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
-// +----------------------------------------------------------------------
-// | Author: CRMEB Team <admin@crmeb.com>
-// +----------------------------------------------------------------------
-
-import {
-	getUserInfo
-} from "../../api/user.js";
-import {
-	LOGIN_STATUS,
-	UID
-} from '../../config/cache';
-import Cache from '../../utils/cache';
-import {
-	USER_INFO
-} from '../../config/cache';
-
-const state = {
-	token: Cache.get(LOGIN_STATUS) || false,
-	backgroundColor: "#fff",
-	userInfo: {},
-	uid: Cache.get(UID) || 0,
-	homeActive: false,
-	phoneStatus:true,
-	pageFooter:uni.getStorageSync('pageFoot') || {}
-};
-
-const mutations = {
-	SETPHONESTATUS(state,val){
-		state.phoneStatus = val;
-	},
-	LOGIN(state, opt) {
-		state.token = opt.token;
-		Cache.set(LOGIN_STATUS, opt.token, opt.time);
-	},
-	SETUID(state,val){
-		state.uid = val;
-		Cache.set(UID, val);
-	},
-	UPDATE_LOGIN(state, token) {
-		state.token = token;
-	},
-	LOGOUT(state) {
-		state.token = false;
-		state.uid = 0
-		Cache.clear(LOGIN_STATUS);
-		Cache.clear(UID);
-	},
-	BACKGROUND_COLOR(state, color) {
-		state.color = color;
-		document.body.style.backgroundColor = color;
-	},
-	UPDATE_USERINFO(state, userInfo) {
-		state.userInfo = userInfo;
-		Cache.set(USER_INFO, userInfo);
-	},
-	OPEN_HOME(state) {
-		state.homeActive = true;
-	},
-	CLOSE_HOME(state) {
-		state.homeActive = false;
-	},
-	FOOT_UPLOAD(state,data){
-		state.pageFooter = data
-	}
-};
-
-const actions = {
-	USERINFO({
-		state,
-		commit
-	}, force) {
-		if (state.userInfo !== null && !force)
-			return Promise.resolve(state.userInfo);
-		else
-			return new Promise(reslove => {
-				getUserInfo().then(res => {
-					commit("UPDATE_USERINFO", res.data);
-					Cache.set(USER_INFO, res.data);
-					reslove(res.data);
-				});
-			}).catch(() => {
-
-			});
-	}
-};
-
-export default {
-	state,
-	mutations,
-	actions
+// +----------------------------------------------------------------------
+// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
+// +----------------------------------------------------------------------
+// | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved.
+// +----------------------------------------------------------------------
+// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
+// +----------------------------------------------------------------------
+// | Author: CRMEB Team <admin@crmeb.com>
+// +----------------------------------------------------------------------
+
+import {
+	getUserInfo
+} from "../../api/user.js";
+import {
+	LOGIN_STATUS,
+	UID,
+	USER_INFO
+} from '../../config/cache';
+import Cache from '../../utils/cache';
+
+const state = {
+	token: Cache.get(LOGIN_STATUS) || false,
+	backgroundColor: "#fff",
+	userInfo: {},
+	uid: Cache.get(UID) || 0,
+	homeActive: false,
+	phoneStatus: true,
+	pageFooter: uni.getStorageSync('pageFoot') || {}
+};
+
+const mutations = {
+	SETPHONESTATUS(state, val) {
+		state.phoneStatus = val;
+	},
+	LOGIN(state, opt) {
+		state.token = opt.token;
+		Cache.set(LOGIN_STATUS, opt.token, opt.time);
+	},
+	SETUID(state, val) {
+		state.uid = val;
+		Cache.set(UID, val);
+	},
+	UPDATE_LOGIN(state, token) {
+		state.token = token;
+	},
+	LOGOUT(state) {
+		state.token = false;
+		state.uid = 0
+		Cache.clear(LOGIN_STATUS);
+		Cache.clear(USER_INFO);
+		Cache.clear(UID);
+		Cache.clear('snsapiCode');
+	},
+	BACKGROUND_COLOR(state, color) {
+		state.color = color;
+		document.body.style.backgroundColor = color;
+	},
+	UPDATE_USERINFO(state, userInfo) {
+		state.userInfo = userInfo;
+		Cache.set(USER_INFO, userInfo);
+	},
+	OPEN_HOME(state) {
+		state.homeActive = true;
+	},
+	CLOSE_HOME(state) {
+		state.homeActive = false;
+	},
+	FOOT_UPLOAD(state, data) {
+		state.pageFooter = data
+	}
+};
+
+const actions = {
+	USERINFO({
+		state,
+		commit
+	}, force) {
+		if (state.userInfo !== null && !force)
+			return Promise.resolve(state.userInfo);
+		else
+			return new Promise(reslove => {
+				getUserInfo().then(res => {
+					commit("UPDATE_USERINFO", res.data);
+					Cache.set(USER_INFO, res.data);
+					reslove(res.data);
+				});
+			}).catch(() => {
+
+			});
+	}
+};
+
+export default {
+	state,
+	mutations,
+	actions
 };

+ 166 - 167
template/uni-app/utils/index.js

@@ -1,168 +1,167 @@
-// +----------------------------------------------------------------------
-// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
-// +----------------------------------------------------------------------
-// | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved.
-// +----------------------------------------------------------------------
-// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
-// +----------------------------------------------------------------------
-// | Author: CRMEB Team <admin@crmeb.com>
-// +----------------------------------------------------------------------
-
-import {
-	spread
-} from "@/api/user";
-import Cache from "@/utils/cache";
-import {
-	getCustomerType
-} from '@/api/api.js'
-import {
-	getWorkermanUrl
-} from '@/api/kefu.js'
-/**
- * 绑定用户授权
- * @param {Object} puid
- */
-export function silenceBindingSpread() {
-
-
-	//#ifdef H5
-	let puid = Cache.get('spread'),
-		code = 0;
-	//#endif
-
-	//#ifdef MP || APP-PLUS
-	let puid = getApp().globalData.spid,
-		code = getApp().globalData.code;
-	//#endif
-
-	puid = parseInt(puid);
-	if (Number.isNaN(puid)) {
-		puid = 0;
-	}
-	if (puid) {
-		spread({
-			puid,
-			code
-		}).then(res => {
-			//#ifdef H5
-			Cache.clear('spread');
-			//#endif
-
-			//#ifdef MP || APP-PLUS
-			getApp().globalData.spid = 0;
-			getApp().globalData.code = 0;
-			//#endif
-
-		}).catch(res => {});
-	}
-}
-
-export function isWeixin() {
-	return navigator.userAgent.toLowerCase().indexOf("micromessenger") !== -1;
-}
-
-export function getCustomer(url) {
-	getCustomerType().then(res => {
-		let type = res.data.customer_type
-		if (type == '0') {
-			uni.navigateTo({
-				url: url || '/pages/extension/customer_list/chat'
-			})
-		} else if (type == '1') {
-			uni.makePhoneCall({
-				phoneNumber: res.data.customer_phone //客服电话
-			});
-		} else {
-			// #ifdef APP-PLUS
-			plus.runtime.openURL(res.data.customer_url)
-			// #endif
-			// #ifdef H5 || MP
-			if (res.data.customer_url.indexOf('work.weixin.qq.com') > 0) {
-				// #ifdef H5
-				return window.location.href = res.data.customer_url
-				// #endif			
-				// #ifdef MP
-				uni.openCustomerServiceChat({
-					extInfo: {
-						url: res.data.customer_url
-					},
-					corpId: res.data.customer_corpId,
-					success(res) {},
-					fail(err) {
-						uni.showToast({
-							title: err.errMsg,
-							icon: 'none',
-							duration: 2000
-						});
-					}
-				})
-				// #endif
-			} else {
-				uni.navigateTo({
-					url: `/pages/annex/web_view/index?url=${res.data.customer_url}`
-				});
-			}
-			// #endif
-		}
-	})
-}
-
-
-export function parseQuery() {
-	const res = {};
-
-	const query = (location.href.split("?")[1] || "")
-		.trim()
-		.replace(/^(\?|#|&)/, "");
-
-	if (!query) {
-		return res;
-	}
-
-	query.split("&").forEach(param => {
-		const parts = param.replace(/\+/g, " ").split("=");
-		const key = decodeURIComponent(parts.shift());
-		const val = parts.length > 0 ? decodeURIComponent(parts.join("=")) : null;
-
-		if (res[key] === undefined) {
-			res[key] = val;
-		} else if (Array.isArray(res[key])) {
-			res[key].push(val);
-		} else {
-			res[key] = [res[key], val];
-		}
-	});
-
-	return res;
-}
-export function updateURLParameter(url, param, paramVal) {
-	var newAdditionalURL = "";
-	var tempArray = url.split("?");
-	var baseURL = tempArray[0];
-	var additionalURL = tempArray[1];
-	var temp = "";
-	if (additionalURL) {
-		tempArray = additionalURL.split("&");
-		for (let i = 0; i < tempArray.length; i++) {
-			if (tempArray[i].split('=')[0] != param) {
-				newAdditionalURL += temp + tempArray[i];
-				temp = "&";
-			}
-		}
-	}
-
-	var rows_txt = temp + "" + param + "=" + paramVal;
-	return baseURL + "?" + newAdditionalURL + rows_txt;
-}
-
-let VUE_APP_WS_URL = Cache.get('WORKERMAN_URL') || ''
-getWorkermanUrl().then(res => {
-	Cache.set('WORKERMAN_URL', res.data.chat)
-	VUE_APP_WS_URL = res.data.chat;
-})
-
-export {
-	VUE_APP_WS_URL
-}
-
+// +----------------------------------------------------------------------
+// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
+// +----------------------------------------------------------------------
+// | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved.
+// +----------------------------------------------------------------------
+// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
+// +----------------------------------------------------------------------
+// | Author: CRMEB Team <admin@crmeb.com>
+// +----------------------------------------------------------------------
+
+import {
+	spread
+} from "@/api/user";
+import Cache from "@/utils/cache";
+import {
+	getCustomerType
+} from '@/api/api.js'
+import {
+	getWorkermanUrl
+} from '@/api/kefu.js'
+import store from '@/store';
+/**
+ * 绑定用户授权
+ * @param {Object} puid
+ */
+export function silenceBindingSpread(app) {
+	console.log(app)
+	//#ifdef H5
+	let puid = Cache.get('spread'),
+		code = 0;
+	//#endif
+
+	//#ifdef MP || APP-PLUS
+	let puid = app.spid,
+		code = app.code;
+	//#endif
+
+	puid = parseInt(puid);
+	if (Number.isNaN(puid)) {
+		puid = 0;
+	}
+	if ((code || puid) && store.state.app.token) {
+		spread({
+			puid,
+			code
+		}).then(res => {
+			//#ifdef H5
+			Cache.clear('spread');
+			//#endif
+			//#ifdef MP || APP-PLUS
+			app.spid = 0;
+			app.code = 0;
+			//#endif
+
+		}).catch(res => {});
+	}
+}
+
+export function isWeixin() {
+	return navigator.userAgent.toLowerCase().indexOf("micromessenger") !== -1;
+}
+
+export function getCustomer(url) {
+	getCustomerType().then(res => {
+		let type = res.data.customer_type
+		if (type == '0') {
+			uni.navigateTo({
+				url: url || '/pages/extension/customer_list/chat'
+			})
+		} else if (type == '1') {
+			uni.makePhoneCall({
+				phoneNumber: res.data.customer_phone //客服电话
+			});
+		} else {
+			// #ifdef APP-PLUS
+			plus.runtime.openURL(res.data.customer_url)
+			// #endif
+			// #ifdef H5 || MP
+			if (res.data.customer_url.indexOf('work.weixin.qq.com') > 0) {
+				// #ifdef H5
+				return window.location.href = res.data.customer_url
+				// #endif			
+				// #ifdef MP
+				uni.openCustomerServiceChat({
+					extInfo: {
+						url: res.data.customer_url
+					},
+					corpId: res.data.customer_corpId,
+					success(res) {},
+					fail(err) {
+						uni.showToast({
+							title: err.errMsg,
+							icon: 'none',
+							duration: 2000
+						});
+					}
+				})
+				// #endif
+			} else {
+				uni.navigateTo({
+					url: `/pages/annex/web_view/index?url=${res.data.customer_url}`
+				});
+			}
+			// #endif
+		}
+	})
+}
+
+
+export function parseQuery() {
+	const res = {};
+
+	const query = (location.href.split("?")[1] || "")
+		.trim()
+		.replace(/^(\?|#|&)/, "");
+
+	if (!query) {
+		return res;
+	}
+
+	query.split("&").forEach(param => {
+		const parts = param.replace(/\+/g, " ").split("=");
+		const key = decodeURIComponent(parts.shift());
+		const val = parts.length > 0 ? decodeURIComponent(parts.join("=")) : null;
+
+		if (res[key] === undefined) {
+			res[key] = val;
+		} else if (Array.isArray(res[key])) {
+			res[key].push(val);
+		} else {
+			res[key] = [res[key], val];
+		}
+	});
+
+	return res;
+}
+export function updateURLParameter(url, param, paramVal) {
+	var newAdditionalURL = "";
+	var tempArray = url.split("?");
+	var baseURL = tempArray[0];
+	var additionalURL = tempArray[1];
+	var temp = "";
+	if (additionalURL) {
+		tempArray = additionalURL.split("&");
+		for (let i = 0; i < tempArray.length; i++) {
+			if (tempArray[i].split('=')[0] != param) {
+				newAdditionalURL += temp + tempArray[i];
+				temp = "&";
+			}
+		}
+	}
+
+	var rows_txt = temp + "" + param + "=" + paramVal;
+	return baseURL + "?" + newAdditionalURL + rows_txt;
+}
+
+let VUE_APP_WS_URL = Cache.get('WORKERMAN_URL') || ''
+getWorkermanUrl().then(res => {
+	Cache.set('WORKERMAN_URL', res.data.chat)
+	VUE_APP_WS_URL = res.data.chat;
+})
+
+export {
+	VUE_APP_WS_URL
+}
+
 export default parseQuery;

+ 5 - 4
template/uni-app/utils/lang.js

@@ -1,18 +1,19 @@
 import Vue from 'vue';
 import VueI18n from 'vue-i18n'
-
+import Cache from '@/utils/cache';
 
 Vue.use(VueI18n)
 
 let lang = '';
 // #ifdef MP || APP-PLUS
-lang = uni.getStorageSync('locale') != '' ? uni.getStorageSync('locale') : 'zh-CN';
+lang = Cache.has('locale') ? Cache.get('locale') : 'zh-CN';
 // #endif
 // #ifdef H5
-lang = uni.getStorageSync('locale') != '' ? uni.getStorageSync('locale') : navigator.language;
+lang = Cache.has('locale') ? Cache.get('locale') : navigator.language;
 // #endif
 const i18n = new VueI18n({
-	locale: lang ? lang : 'zh-CN',
+	locale: lang,
+	fallbackLocale: 'zh-CN',
 	messages: uni.getStorageSync('localeJson')
 })
 export default i18n