mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-uniapp.git
synced 2025-12-19 00:45:54 +08:00
@@ -7,6 +7,9 @@
|
||||
<!-- #ifdef APP-PLUS -->
|
||||
Version {{localVersion.version}}
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
小程序版本: {{localVersion.version}} {{ localVersion.envVersion}}
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
|
||||
<!-- {{localVersion}} -->
|
||||
@@ -16,6 +19,7 @@
|
||||
<u-cell-item title="功能介绍" @click="navigateTo('/pages/mine/set/versionFunctionList')"></u-cell-item>
|
||||
<u-cell-item title="检查更新" @click="checkUpdate"></u-cell-item>
|
||||
<!-- #endif -->
|
||||
|
||||
<u-cell-item title="证照信息" @click="navigateTo('/pages/mine/help/tips?type=message')"></u-cell-item>
|
||||
<u-cell-item title="服务协议" @click="navigateTo('/pages/mine/help/tips?type=user')"></u-cell-item>
|
||||
<u-cell-item title="隐私协议" @click="navigateTo('/pages/mine/help/tips?type=privacy')"></u-cell-item>
|
||||
@@ -74,6 +78,19 @@ export default {
|
||||
};
|
||||
});
|
||||
// #endif
|
||||
|
||||
|
||||
// #ifdef MP-WEIXIN
|
||||
const accountInfo = wx.getAccountInfoSync();
|
||||
console.log("===========accountInfo==============");
|
||||
console.log(accountInfo);
|
||||
this.version_number = accountInfo.miniProgram.version // 小程序 版本号
|
||||
this.localVersion = {
|
||||
versionCode: accountInfo.miniProgram.version.replace(/\./g, ""),
|
||||
version: accountInfo.miniProgram.version ,// 小程序 版本号,
|
||||
envVersion:accountInfo.miniProgram.envVersion, //判断小程序是开发版本还是release版本
|
||||
};
|
||||
// #endif
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
||||
@@ -23,12 +23,16 @@
|
||||
<u-input v-model="form.___path" disabled @click="clickRegion" />
|
||||
</u-form-item>
|
||||
<view class="submit" @click="submit">保存</view>
|
||||
<view class="submit" @click="showModalDialog">退出登录</view>
|
||||
<u-modal show-cancel-button v-model="quitShow" @confirm="confirm" :confirm-color="lightColor" :async-close="true"
|
||||
:content="'确定要退出登录么?'"></u-modal>
|
||||
</u-form>
|
||||
|
||||
<m-city :provinceData="region" headTitle="区域选择" ref="cityPicker" @funcValue="getpickerParentValue" pickerSize="4"></m-city>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import { logout } from "@/api/login";
|
||||
import { saveUserInfo } from "@/api/members.js";
|
||||
import { upload } from "@/api/common.js";
|
||||
import storage from "@/utils/storage.js";
|
||||
@@ -38,6 +42,7 @@ export default {
|
||||
components: { uFormItem, "m-city": gkcity },
|
||||
data() {
|
||||
return {
|
||||
quitShow: false,
|
||||
lightColor: this.$lightColor, //高亮颜色
|
||||
form: {
|
||||
nickName: storage.getUserInfo().nickName || "",
|
||||
@@ -65,6 +70,35 @@ export default {
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 显示退出登录对话框
|
||||
*/
|
||||
showModalDialog() {
|
||||
this.quitShow = true;
|
||||
},
|
||||
|
||||
clear() {
|
||||
storage.setAccessToken("");
|
||||
storage.setRefreshToken("");
|
||||
storage.setUserInfo({});
|
||||
this.$options.filters.navigateToLogin("redirectTo");
|
||||
},
|
||||
|
||||
/**
|
||||
* 确认退出
|
||||
* 清除缓存重新登录
|
||||
*/
|
||||
async confirm() {
|
||||
try{
|
||||
await logout();
|
||||
this.clear();
|
||||
}catch(e){
|
||||
//TODO handle the exception
|
||||
this.clear();
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 选择地址回调
|
||||
*/
|
||||
|
||||
@@ -22,9 +22,9 @@
|
||||
<!-- #endif -->
|
||||
<u-cell-item :title="`关于${config.name}`" @click="navigateTo('/pages/mine/set/editionIntro')"></u-cell-item>
|
||||
</u-cell-group>
|
||||
<view class="submit" @click="showModalDialog">{{userInfo.id ?'退出登录':'返回登录'}}</view>
|
||||
<view class="submit" @click="showModalDialog">{{userInfo.id ?'退出登录':'登录'}}</view>
|
||||
<u-modal show-cancel-button v-model="quitShow" @confirm="confirm" :confirm-color="lightColor" :async-close="true"
|
||||
:content="userInfo.id ? '确定要退出登录么?' : '确定要返回登录么?'"></u-modal>
|
||||
:content="userInfo.id ? '确定要退出登录么?' : '确定要登录么?'"></u-modal>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user