|
|
@@ -0,0 +1,73 @@
|
|
|
+<template>
|
|
|
+ <div class="changeChain">
|
|
|
+ <van-nav-bar class="navBar" title="切换经销商" left-arrow @click-left="onClickLeft" />
|
|
|
+ <div class="content">
|
|
|
+ <div class="module">
|
|
|
+ <div class="box">
|
|
|
+ <div class="label">允许拍照时缩放,但每张会保存到本地相册</div>
|
|
|
+ <div class="value">
|
|
|
+ <van-switch v-model="switchChecked" size="20" @change="change" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+<script>
|
|
|
+import { mapState } from 'vuex';
|
|
|
+import { setPhotoMethod } from '@/api/week';
|
|
|
+import store from '@/store';
|
|
|
+export default {
|
|
|
+ name: 'changeChain',
|
|
|
+ computed: {
|
|
|
+ ...mapState({
|
|
|
+ userInfo: (state) => state.user.userInfo,
|
|
|
+ }),
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {};
|
|
|
+ },
|
|
|
+ created() {},
|
|
|
+ methods: {
|
|
|
+ change(value) {
|
|
|
+ console.log(value);
|
|
|
+ this.toastLoading(0, '加载中...', true);
|
|
|
+ setPhotoMethod({ photoMethod: value ? 1 : 0 }).then((res) => {
|
|
|
+ this.toastLoading().clear();
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.$toast('设置成功');
|
|
|
+ // 获取移动端获取用户信息接口
|
|
|
+ store.dispatch('getUserInfo');
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ onClickLeft() {
|
|
|
+ this.$router.go(-1);
|
|
|
+ },
|
|
|
+ },
|
|
|
+};
|
|
|
+</script>
|
|
|
+<style lang="scss" scoped>
|
|
|
+.changeChain {
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ .content {
|
|
|
+ margin: 10px 16px;
|
|
|
+ .module {
|
|
|
+ margin-bottom: 10px;
|
|
|
+ .title {
|
|
|
+ font-size: 16px;
|
|
|
+ padding: 10px 0;
|
|
|
+ }
|
|
|
+ .box {
|
|
|
+ background: #fff;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: space-between;
|
|
|
+ padding: 10px;
|
|
|
+ font-size: 16px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|