| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274 | <template>	<view>		<!-- 设置 -->		<u-card :border="false" padding="30" box-shadow="0px 1px 10px rgba(0,0,0,0.2)" border-radius="20" :show-foot="false"		 :show-head="false" @click="tishi">			<view slot="body">				<view class="u-flex u-row-between">					<view class="">						<u-image width="130rpx" height="130rpx" :src="userInfo.storeImageUrl" :lazy-load="true" shape="circle">							<view slot="error" style="font-size: 24rpx" :fade="true" duration="450">加载失败							</view>						</u-image>					</view>					<view class="u-flex">						<!-- <view class="u-m-r-50" style="color: #0d79ec; font-size: 32rpx">修改门头照</view> -->						<u-icon name="arrow-right" color="#0D79EC" size="28"></u-icon>					</view>				</view>			</view>		</u-card>		<u-card :border="false" padding="20" box-shadow="0px 1px 10px rgba(0,0,0,0.2)" border-radius="20" :show-foot="false"		 :show-head="false">			<view slot="body">				<template>					<u-cell-group :border="false">						<u-cell-item title="收货地址管理" @click="tishi">							<u-icon slot="icon" size="42" name="location-o" custom-prefix="van-icon" color="#0095FF" style="margin-right: 10rpx"></u-icon>						</u-cell-item>						<u-cell-item title="门店名称" :value="userInfo.storeName" :arrow="false">							<u-icon slot="icon" size="42" name="shop-o" custom-prefix="van-icon" color="#0095FF" style="margin-right: 10rpx"></u-icon>						</u-cell-item>						<u-cell-item title="门店联系人" :value="userInfo.contactName" :arrow="false">							<u-icon slot="icon" size="42" name="contact" custom-prefix="van-icon" color="#0095FF" style="margin-right: 10rpx"></u-icon>						</u-cell-item>						<u-cell-item title="联系电话" :value="userInfo.storePhone" :arrow="false">							<u-icon slot="icon" size="42" name="phone-o" custom-prefix="van-icon" color="#0095FF" style="margin-right: 10rpx"></u-icon>						</u-cell-item>						<u-cell-item title="用户协议">							<u-icon slot="icon" size="42" name="friends-o" custom-prefix="van-icon" color="#0095FF" style="margin-right: 10rpx"></u-icon>						</u-cell-item>						<u-cell-item title="隐私政策">							<u-icon slot="icon" size="42" name="info-o" custom-prefix="van-icon" color="#0095FF" style="margin-right: 10rpx"></u-icon>						</u-cell-item>						<u-cell-item title="版本检测" :value="edition_s" :arrow="false" :border-bottom="false" @click="edition">							<u-icon slot="icon" size="42" name="setting-o" custom-prefix="van-icon" color="#0095FF" style="margin-right: 10rpx"></u-icon>						</u-cell-item>					</u-cell-group>				</template>			</view>		</u-card>		<u-button type="primary" @click="exit" style="margin: 20rpx">安全退出</u-button>		<luo-version-upgrade v-if="show_s == true" version="1.0.1" :url="url" :is_force="is_force" :describe="Copywriting"></luo-version-upgrade>	</view></template><script>	import {		mapMutations	} from "vuex";	import {		request	} from "../../../common/request/request";	require("promise.prototype.finally").shim();	export default {		data() {			return {				userInfo: {},				edition_s: '',				show_s: false,				url: '',				is_force: false,				Copywriting: ''			};		},		created() {			this.getMyinfo();			plus.runtime.getProperty(plus.runtime.appid, (wgtinfo) => {				console.log(wgtinfo);				console.log(wgtinfo.version); //版本号				this.edition_s = wgtinfo.version			})		},		methods: {			...mapMutations(["logout"]),			exit() {				this.logout();				this.$u.route({					url: "pages/login/index",					type: "reLaunch",				});			},			edition() {				uni.getSystemInfo({					success: res => {						console.log(res.platform);					},					complete: err => {						if (err.platform == 'android') {							this.onLaunch_s()						} else if (err.platform == 'ios') {							console.log("暂无数据")							this.iosstartup()						}					}				});			},			iosstartup(){				request({						url: '/baseReq/apkUpgrade',						method: 'get',						params: {							osType: 1						}					}).then(res => {						console.log(res)						console.log(res.data.code)						console.log(res.data.forceVersion) //最低版本						console.log(res.data.msg) //更新文案						console.log(res.data.version) //最新版本										plus.runtime.getProperty(plus.runtime.appid, (wgtinfo) => {							console.log(wgtinfo);							console.log(wgtinfo.version); //版本号							if (wgtinfo.version == res.data.version) {								this.show_s = true								uni.showToast({									icon: 'none',									title: '已是最新版本',									position: "bottom"								})								console.log("已是最新版本")							} else if (wgtinfo.version != res.data.forceVersion) {								console.log("强制版本更新")								res.data.msg = res.data.msg.replace(/\\n/g,"\n")								uni.showModal({									title: "发现新版本",									content: res.data.msg,									showCancel: false,									confirmText: "立即去AppStore更新",									success: function(res) {										if (res.confirm) {											console.log('用户点击确定');											let appleId = 1518555723											plus.runtime.launchApplication({												action: `itms-apps://itunes.apple.com/cn/app/id${appleId}?mt=8`											}, function(e) {												console.log('Open system default browser failed: ' + e.message);											});										} else if (res.cancel) {											console.log('用户点击取消');										}									}								})							} else if (wgtinfo.version == res.data.forceVersion) {								console.log("最低版本更新")								res.data.msg = res.data.msg.replace(/\\n/g,"\n")								uni.showModal({									title: "发现新版本",									content: res.data.msg,									showCancel: true,									confirmText: "立即去AppStore更新",									success: function(res) {										if (res.confirm) { 											console.log('用户点击确定');											let appleId = 1518555723											plus.runtime.launchApplication({												action: `itms-apps://itunes.apple.com/cn/app/id${appleId}?mt=8`											}, function(e) {												console.log('Open system default browser failed: ' + e.message);											});										} else if (res.cancel) {											console.log('用户点击取消');										}									}								})							}										})									}).catch(err => {						console.log(err)					})					.finally(() => {						// Loading.close()					})			},			onLaunch_s() {				//升级调用的接口				if (this.show_s == true) {					this.show_s = false				}				console.log(this.show_s)				request({						url: '/baseReq/apkUpgrade',						method: 'get',						params: {							osType: 0						}					}).then(res => {						console.log(res)						console.log(res.data.forceVersion) //最低版本						console.log(res.data.msg) //更新文案						console.log(res.data.url) //下载最新版地址						console.log(res.data.version) //最新版本						plus.runtime.getProperty(plus.runtime.appid, (wgtinfo) => {							console.log(wgtinfo);							console.log(wgtinfo.version); //版本号							if (wgtinfo.version == res.data.version) {								this.show_s = false								uni.showToast({									icon: 'none',									title: '已经是最新版本了',									position: "bottom"								})								this.closeModal();								console.log("已经是最新版本了")							} else if (wgtinfo.version != res.data.forceVersion) {								console.log("必须强制更新")								this.Copywriting = res.data.msg								this.show_s = true								console.log(res.data.url)								this.url = res.data.url								this.is_force = true							} else if (wgtinfo.version == res.data.forceVersion) {								console.log("达到最低版本")								this.Copywriting = res.data.msg								console.log(this.Copywriting)								this.is_force = false								this.show_s = true								console.log(this.show_s)								this.url = res.data.url							}						})					}).catch(err => {						console.log(err)					})					.finally(() => {						// Loading.close()					})			},			getMyinfo() {				request({						url: "/myapp/selectStore",						method: "post",						data: {							storeId: this.$store.state.storeInfo.storeId,						},					})					.then((res) => {						this.userInfo = res.data.data;						console.log(this.userInfo);					})					.catch((err) => {						console.log(err);					})					.finally(() => {						this.loading = false;						uni.hideLoading();					});			},			tishi() {				this.$u.toast('此功能暂不开放');			}		},	};</script><style></style>
 |