achao 2 years ago
parent
commit
47a1d47781

+ 14 - 14
unimall-admin/src/api/card/info.js

@@ -1,71 +1,71 @@
 import request from '@/utils/request'
 
-// 查询搜索记录列表
+// 查询名片交换列表
 export function listInfo(query) {
   return request({
     method: 'get',
     params: {
-      _gp: 'admin.unimall.searchRecordsInfo',
+      _gp: 'admin.unimall.cardExchangeInfo',
       _mt: 'list',
       ...query
     }
   })
 }
 
-// 查询搜索记录详细
+// 查询名片交换详细
 export function getInfo(id) {
   return request({
     method: 'get',
     params: {
-      _gp: 'admin.unimall.searchRecordsInfo',
+      _gp: 'admin.unimall.cardExchangeInfo',
       _mt: 'get',
       id: id
     }
   })
 }
 
-// 新增搜索记录
+// 新增名片交换
 export function addInfo(data) {
   return request({
     method: 'post',
     params: {
-      _gp: 'admin.unimall.searchRecordsInfo',
+      _gp: 'admin.unimall.cardExchangeInfo',
       _mt: 'add',
-      searchRecordsInfo: data
+      cardExchangeInfo: data
     }
   })
 }
 
-// 修改搜索记录
+// 修改名片交换
 export function updateInfo(data) {
   return request({
     method: 'post',
     params: {
-      _gp: 'admin.unimall.searchRecordsInfo',
+      _gp: 'admin.unimall.cardExchangeInfo',
       _mt: 'update',
-      searchRecordsInfo: data
+      cardExchangeInfo: data
     }
   })
 }
 
-// 删除搜索记录
+// 删除名片交换
 export function delInfo(id) {
   return request({
     method: 'post',
     params: {
-      _gp: 'admin.unimall.searchRecordsInfo',
+      _gp: 'admin.unimall.cardExchangeInfo',
       _mt: 'delete',
       id: id
     }
   })
 }
 
-// 导出搜索记录
+// 导出名片交换
 export function exportInfo(query) {
   return request({
     method: 'get',
     params: {
-      _gp: 'admin.unimall.searchRecordsInfo',
+      _gp: 'admin.unimall.cardExchangeInfo',
       _mt: 'export',
       ...query
     }

+ 0 - 63
unimall-admin/src/router/route.json

@@ -43,69 +43,6 @@
         "name": "sysManage",
         "alwaysShow": true
     },
-    {
-        "redirect": "noredirect",
-        "path": "/circle",
-        "children": [{
-            "path": "circle",
-            "meta": {
-                "noCache": true,
-                "icon": "admin",
-
-                "title": "超市圈"
-            },
-            "name": "admin",
-            "page": "/circle"
-        }],
-        "meta": {
-            "icon": "sys",
-            "title": "业务管理"
-        },
-        "name": "sysManage",
-        "alwaysShow": true
-    },
-    {
-        "redirect": "noredirect",
-        "path": "/advertisement",
-        "children": [{
-            "path": "advertisement",
-            "meta": {
-                "noCache": true,
-                "icon": "admin",
-
-                "title": "轮播图"
-            },
-            "name": "admin",
-            "page": "/advertisement"
-        }],
-        "meta": {
-            "icon": "sys",
-            "title": "广告管理"
-        },
-        "name": "sysManage",
-        "alwaysShow": true
-    },
-    {
-        "redirect": "noredirect",
-        "path": "/shopInfo",
-        "children": [{
-            "path": "shopInfo",
-            "meta": {
-                "noCache": true,
-                "icon": "admin",
-
-                "title": "超市"
-            },
-            "name": "admin",
-            "page": "/shopInfo/index"
-        }],
-        "meta": {
-            "icon": "sys",
-            "title": "超市管理"
-        },
-        "name": "sysManage",
-        "alwaysShow": true
-    },
     {
         "redirect": "noredirect",
         "name": "sysTools",

+ 397 - 0
unimall-admin/src/views/info/index.vue

@@ -0,0 +1,397 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px">
+      <el-form-item label="发起人id" prop="sendId">
+        <el-input
+          v-model="queryParams.sendId"
+          placeholder="请输入发起人id"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="接收人id" prop="receiveId">
+        <el-input
+          v-model="queryParams.receiveId"
+          placeholder="请输入接收人id"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="发起人名片id" prop="sendCarId">
+        <el-input
+          v-model="queryParams.sendCarId"
+          placeholder="请输入发起人名片id"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="接收人名片id" prop="receiveCarId">
+        <el-input
+          v-model="queryParams.receiveCarId"
+          placeholder="请输入接收人名片id"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="圈子名称" prop="circleName">
+        <el-input
+          v-model="queryParams.circleName"
+          placeholder="请输入圈子名称"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+        <el-form-item label="状态(1已接受3已拒绝5已过期)" prop="status">
+        <el-select v-model="queryParams.status" placeholder="请选择状态(1已接受3已拒绝5已过期)" clearable size="small">
+          <el-option label="请选择字典生成" value="" />
+        </el-select>
+      </el-form-item>
+      <el-form-item label="" prop="gmtCreate">
+        <el-date-picker clearable size="small" style="width: 200px"
+          v-model="queryParams.gmtCreate"
+          type="date"
+          value-format="yyyy-MM-dd"
+          placeholder="选择">
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item label="" prop="gmtUpdate">
+        <el-date-picker clearable size="small" style="width: 200px"
+          v-model="queryParams.gmtUpdate"
+          type="date"
+          value-format="yyyy-MM-dd"
+          placeholder="选择">
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item label="删除标识" prop="deleteFlag">
+        <el-input
+          v-model="queryParams.deleteFlag"
+          placeholder="请输入删除标识"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-permission="['unimall:info:add']"
+        >新增</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate"
+          v-permission="['unimall:info:edit']"
+        >修改</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-permission="['unimall:info:remove']"
+        >删除</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          v-permission="['unimall:info:export']"
+        >导出</el-button>
+      </el-col>
+    </el-row>
+
+    <el-table v-loading="loading" :data="infoList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="" align="center" prop="id" />
+      <el-table-column label="发起人id" align="center" prop="sendId" />
+      <el-table-column label="接收人id" align="center" prop="receiveId" />
+      <el-table-column label="发起人名片id" align="center" prop="sendCarId" />
+      <el-table-column label="接收人名片id" align="center" prop="receiveCarId" />
+      <el-table-column label="圈子名称" align="center" prop="circleName" />
+      <el-table-column label="状态(1已接受3已拒绝5已过期)" align="center" prop="status" />
+      <el-table-column label="" align="center" prop="gmtCreate" width="180">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.gmtCreate) }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="" align="center" prop="gmtUpdate" width="180">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.gmtUpdate) }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="删除标识" align="center" prop="deleteFlag" />
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-permission="['unimall:info:edit']"
+          >修改</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-permission="['unimall:info:remove']"
+          >删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+    
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改名片交换对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="500px">
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="发起人id" prop="sendId">
+          <el-input v-model="form.sendId" placeholder="请输入发起人id" />
+        </el-form-item>
+        <el-form-item label="接收人id" prop="receiveId">
+          <el-input v-model="form.receiveId" placeholder="请输入接收人id" />
+        </el-form-item>
+        <el-form-item label="发起人名片id" prop="sendCarId">
+          <el-input v-model="form.sendCarId" placeholder="请输入发起人名片id" />
+        </el-form-item>
+        <el-form-item label="接收人名片id" prop="receiveCarId">
+          <el-input v-model="form.receiveCarId" placeholder="请输入接收人名片id" />
+        </el-form-item>
+        <el-form-item label="圈子名称" prop="circleName">
+          <el-input v-model="form.circleName" placeholder="请输入圈子名称" />
+        </el-form-item>
+        <el-form-item label="状态(1已接受3已拒绝5已过期)">
+          <el-radio-group v-model="form.status">
+            <el-radio label="1">请选择字典生成</el-radio>
+          </el-radio-group>
+        </el-form-item>
+        <el-form-item label="" prop="gmtCreate">
+          <el-date-picker clearable size="small" style="width: 200px"
+            v-model="form.gmtCreate"
+            type="date"
+            value-format="yyyy-MM-dd"
+            placeholder="选择">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="" prop="gmtUpdate">
+          <el-date-picker clearable size="small" style="width: 200px"
+            v-model="form.gmtUpdate"
+            type="date"
+            value-format="yyyy-MM-dd"
+            placeholder="选择">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="删除标识" prop="deleteFlag">
+          <el-input v-model="form.deleteFlag" placeholder="请输入删除标识" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { listInfo, getInfo, delInfo, addInfo, updateInfo, exportInfo } from "@/api/card/info";
+
+export default {
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 总条数
+      total: 0,
+      // 名片交换表格数据
+      infoList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        sendId: undefined,
+        receiveId: undefined,
+        sendCarId: undefined,
+        receiveCarId: undefined,
+        circleName: undefined,
+        status: undefined,
+        gmtCreate: undefined,
+        gmtUpdate: undefined,
+        deleteFlag: undefined
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+        gmtCreate: [
+          { required: true, message: "不能为空", trigger: "blur" }
+        ],        gmtUpdate: [
+          { required: true, message: "不能为空", trigger: "blur" }
+        ],        deleteFlag: [
+          { required: true, message: "删除标识不能为空", trigger: "blur" }
+        ]      }
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    /** 查询名片交换列表 */
+    getList() {
+      this.loading = true;
+      listInfo(this.queryParams).then(response => {
+        this.infoList = response.data.data.items
+        this.total = response.data.data.count
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: undefined,
+        sendId: undefined,
+        receiveId: undefined,
+        sendCarId: undefined,
+        receiveCarId: undefined,
+        circleName: undefined,
+        status: "0",
+        gmtCreate: undefined,
+        gmtUpdate: undefined,
+        deleteFlag: undefined
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.id)
+      this.single = selection.length!=1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加名片交换";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const id = row.id || this.ids.join(',')
+      getInfo(id).then(response => {
+        this.form = response.data.data
+        this.open = true;
+        this.title = "修改名片交换";
+      });
+    },
+    /** 提交按钮 */
+    submitForm: function() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.id != undefined) {
+            updateInfo(this.form).then(response => {
+              if (response.data) {
+                this.msgSuccess("修改成功");
+                this.open = false;
+                this.getList();
+              } else {
+                this.msgError(response.msg);
+              }
+            });
+          } else {
+            addInfo(this.form).then(response => {
+              if (response.data) {
+                this.msgSuccess("新增成功");
+                this.open = false;
+                this.getList();
+              } else {
+                this.msgError(response.msg);
+              }
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids.join(',')
+      this.$confirm('是否确认删除名片交换编号为"' + ids + '"的数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return delInfo(ids);
+        }).then(() => {
+          this.getList();
+          this.msgSuccess("删除成功");
+        }).catch(function() {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      const queryParams = this.queryParams;
+      this.$confirm('是否确认导出所有名片交换数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return exportInfo(queryParams);
+        }).then(response => {
+          this.download(response.data.data);
+        }).catch(function() {});
+    }
+  }
+};
+</script>

+ 2 - 2
xiaochengxu/pages.json

@@ -128,7 +128,7 @@
 		}, {
 			"path": "pages/mySet/set",
 			"style": {
-				"navigationBarTitleText": "",
+				"navigationBarTitleText": "设置",
 				"enablePullDownRefresh": false
 			}
 
@@ -143,7 +143,7 @@
 		{
 			"path": "pages/mySet/help",
 			"style": {
-				"navigationBarTitleText": "",
+				"navigationBarTitleText": "帮助说明",
 				"enablePullDownRefresh": false
 			}
 

+ 51 - 14
xiaochengxu/pages/cardHolder/cardHolder.vue

@@ -37,6 +37,12 @@
 				@down="downCallback">
 				<view v-for='(item,index) in cardHolderList' @longpress="longpress" class="item flex">
 					<!-- <view class="card-list-item" style="background:red"> -->
+					<u-checkbox-group v-if='islongPress' placement="column"
+						@change="checkboxChange($event,index)">
+						<u-checkbox :name='index+1' :checked='item.checked'
+							:customStyle="{marginBottom: '8px'}">
+						</u-checkbox>
+					</u-checkbox-group>
 					<view class="card-list-item"
 						:style="'background:url('+item.currentBackground+');background-size:100% 100%'">
 						<view class="card-content style1" v-if="item.cuttentTemplate==1">
@@ -60,9 +66,10 @@
 									<uni-icons type="phone-filled" size="20" style="margin-right: 20rpx;"
 										color="#5e6d82"></uni-icons>{{ item.phone }}
 								</view>
-								<!-- <view class="">
-									备注
-								</view> -->
+								<view @click='remarkEdit(item)' class="row2"  style="color: #808080">
+									<uni-icons type="redo" size="20" style="margin-right: 20rpx;"></uni-icons>
+									<text>{{item.remark?item.remark:'单击添加备注'}}</text>
+								</view>
 							</view>
 						</view>
 						<view class="card-content style1 flex-between" v-if="item.cuttentTemplate==2">
@@ -82,9 +89,10 @@
 									<uni-icons type="phone-filled" size="20" style="margin-right: 20rpx;"
 										color="#5e6d82"></uni-icons>{{ item.phone }}
 								</view>
-								<!-- <view class="">
-									备注
-								</view> -->
+								<view @click='remarkEdit(item)' class="row2"  style="color: #808080">
+									<uni-icons type="redo" size="20" style="margin-right: 20rpx;"></uni-icons>
+									<text>{{item.remark?item.remark:'单击添加备注'}}</text>
+								</view>
 							</view>
 							<view class="left">
 								<u--image :showLoading="true" :src="item.headSculpture" width="66px" height="66px"
@@ -119,6 +127,10 @@
 										<uni-icons type="phone-filled" size="20" style="margin-right: 20rpx;"
 											color="#5e6d82"></uni-icons>{{ item.phone }}
 									</view>
+									<view @click='remarkEdit(item)' class="row2"  style="color: #808080">
+										<uni-icons type="redo" size="20" style="margin-right: 20rpx;"></uni-icons>
+										<text>{{item.remark?item.remark:'单击添加备注'}}</text>
+									</view>
 								</view>
 							</view>
 						</view>
@@ -149,6 +161,10 @@
 										<uni-icons type="phone-filled" size="20" style="margin-right: 20rpx;"
 											color="#5e6d82"></uni-icons>{{ item.phone }}
 									</view>
+									<view @click='remarkEdit(item)' class="row2"  style="color: #808080">
+										<uni-icons type="redo" size="20" style="margin-right: 20rpx;"></uni-icons>
+										<text>{{item.remark?item.remark:'单击添加备注'}}</text>
+									</view>
 								</view>
 							</view>
 						</view>
@@ -166,9 +182,6 @@
 							</view>
 						</view>
 					</view>
-
-
-
 					<!-- <view class="left">
 						<view class="top flex-row-center">
 							<image :src="item.headSculpture" mode="widthFix" class="img"></image>
@@ -210,7 +223,16 @@
 				</view>
 			</mescroll-body>
 		</view>
-
+		<view class="del-style" v-if="islongPress">
+			<view class="left">
+				<text class="qx" @click="islongPress=false">取消</text>
+				<text class="del" @click="delShow=true">删除</text>
+			</view>
+			<view class="right">
+				全选
+			</view>
+			
+		</view>
 		<u-picker :show="isShowType" :columns="typeColumns" keyName="circleName" title="选择分类" @close="isShowType=false"
 			@cancel="isShowType=false" closeOnClickOverlay @confirm="typeConfirm"></u-picker>
 		<u-toast ref="uToast"></u-toast>
@@ -1034,7 +1056,7 @@
 				}
 
 				.row2 {
-					margin-top: 20rpx;
+					margin-top: 10rpx;
 					font-size: 24rpx;
 					font-weight: bold;
 					color: #323333;
@@ -1071,7 +1093,7 @@
 				}
 
 				.row2 {
-					margin-top: 20rpx;
+					margin-top: 10rpx;
 					font-size: 24rpx;
 					font-weight: bold;
 					color: #323333;
@@ -1100,7 +1122,7 @@
 					}
 
 					.row2 {
-						margin-top: 20rpx;
+						margin-top: 10rpx;
 						font-size: 24rpx;
 						font-weight: bold;
 						color: #323333;
@@ -1117,7 +1139,7 @@
 					}
 
 					.row2 {
-						margin-top: 20rpx;
+						margin-top: 10rpx;
 					}
 				}
 			}
@@ -1212,4 +1234,19 @@
 		transform: translateY(-50%);
 		text-align: center;
 	}
+	/deep/.u-checkbox-group{
+		position: absolute;
+		    right: 20px;
+		    z-index: 99;
+		    top: 30px;
+	}
+	.del-style{
+		background: #fff;
+		padding: 20rpx;
+		width:calc(100vw - 40rpx);
+		position: fixed;
+		display: flex;
+		justify-content: space-between;
+		bottom:0
+	}
 </style>

+ 3 - 1
xiaochengxu/pages/mySet/myCard.vue

@@ -4,6 +4,7 @@
 		</u-navbar>
 		<view class="flex content1 flex-between">
 			<view @click='addclick' class="button">
+				<!-- <u--image :showLoading="true" src="../../static/imgs/mySet/add.png" width="80px" height="80px"></u--image> -->
 				<image src="../../static/imgs/mySet/add.png" mode="widthFix" class="btn-img"></image>
 				新增
 			</view>
@@ -664,7 +665,8 @@
 			background: #fff;
 			color: #333333;
 			border-radius: 20rpx;
-			padding: 24rpx;
+			padding:0 24rpx;
+			height: 70rpx;
 			width: calc(33% - 60rpx);
 			font-size:32rpx;
 		}

+ 2 - 1
xiaochengxu/pages/mySet/mySet.vue

@@ -74,7 +74,8 @@
 			console.log(this.userInfo)
 		},
 		methods: {
-			menuClick(typeName) {
+			menuClick(typeName) {debugger
+				if(typeName=="contactCustomer") return
 				let _url = '/pages/mySet/' + typeName
 				console.log(_url)
 				uni.navigateTo({

+ 71 - 39
xiaochengxu/pages/mySet/set.vue

@@ -1,16 +1,17 @@
 <template>
-	<view>
-		<view class='flex'>
+	<view class="content">
+		<view class='flex bottom flex-between' style="padding: 20rpx;">
 			<text>允许他人分享我的名片</text>
-			<u-switch  v-model="value1" :activeValue='true' :inactiveValue='false' @change="change($event,1)"></u-switch>
+			<u-switch v-model="value1" :activeValue='true' :inactiveValue='false' @change="change($event,1)"
+				size="20"></u-switch>
 		</view>
-		<view class="flex">
+		<view class='flex bottom flex-between' style="padding: 20rpx;">
 			<text>允许圈子成员查看我的主页</text>
-			<u-switch v-model="value2"  @change="change($event,2)"></u-switch>
+			<u-switch v-model="value2" @change="change($event,2)" size="20"></u-switch>
 		</view>
-		<view class="flex">
-			<text>自动接受换名片邀请</text>
-			<u-switch v-model="value3"  @change="change($event,3)"></u-switch>
+		<view class="flex flex-between" style="padding: 20rpx;">
+			<text>自动接受换名片邀请</text>
+			<u-switch v-model="value3" @change="change($event,3)" size="20"></u-switch>
 		</view>
 		<u-toast ref="uToast"></u-toast>
 	</view>
@@ -20,31 +21,44 @@
 	export default {
 		data() {
 			return {
-				value1:false,
-				value2:false,
-				value3:false
+				value1: false,
+				value2: false,
+				value3: false
 			};
 		},
 		onShow() {
-			this.value1=(uni.getStorageSync("userInfo").shareCard==1?true:false)
-			this.value2=(uni.getStorageSync("userInfo").lookPage==1?true:false)
-			this.value3=(uni.getStorageSync("userInfo").autoAccept==1?true:false)
+			this.value1 = (uni.getStorageSync("userInfo").shareCard == 1 ? true : false)
+			this.value2 = (uni.getStorageSync("userInfo").lookPage == 1 ? true : false)
+			this.value3 = (uni.getStorageSync("userInfo").autoAccept == 1 ? true : false)
 		},
 		methods: {
-			change(e,status){
+			change(e, status) {
 				console.log(e)
-				var data={id:uni.getStorageSync("userInfo").id}
-				if(status==1){
-					if(e) data.shareCard=1
-					else data.shareCard=0
-				}else if(status==2){
-					if(e) data.lookPage=1
-					else data.lookPage=0
-				}else if(status==3){
-					if(e) data.autoAccept=1
-					else data.autoAccept=0
+				let data = {
+					id: uni.getStorageSync("userInfo").id
 				}
-				this.$request.baseRequest('admin.unimall.commonUserInfo', 'update',{commonUserInfo:JSON.stringify(data)}, failres => {
+				if (status == 1) {
+					if (e) {
+						data.shareCard = 1
+					} else {
+						data.shareCard = 0
+					}
+				} else if (status == 2) {
+					if (e) {
+						data.lookPage = 1
+					} else {
+						data.lookPage = 0
+					}
+				} else if (status == 3) {
+					if (e) {
+						data.autoAccept = 1
+					} else {
+						data.autoAccept = 0
+					}
+				}
+				this.$request.baseRequest('admin.unimall.commonUserInfo', 'update', {
+					commonUserInfo: JSON.stringify(data)
+				}, failres => {
 					console.log('res+++++', failres.errmsg)
 					this.$refs.uToast.show({
 						type: 'error',
@@ -56,24 +70,42 @@
 						type: 'success',
 						message: '设置成功',
 					})
-					var userInfo=uni.getStorageSync("userInfo")
-					if(status==1){
-						if(e) userInfo.shareCard=1
-						else userInfo.shareCard=0
-					}else if(status==2){
-						if(e) userInfo.lookPage=1
-						else userInfo.lookPage=0
-					}else if(status==3){
-						if(e) userInfo.autoAccept=1
-						else userInfo.autoAccept=0
+					let userInfo = uni.getStorageSync("userInfo")
+					if (status == 1) {
+						if (e) {
+							userInfo.shareCard = 1
+						} else {
+							userInfo.shareCard = 0
+						}
+					} else if (status == 2) {
+						if (e) {
+							userInfo.lookPage = 1
+						} else {
+							userInfo.lookPage = 0
+						}
+					} else if (status == 3) {
+						if (e) {
+							userInfo.autoAccept = 1
+						} else {
+							userInfo.autoAccept = 0
+						}
 					}
-					uni.setStorageSync("userInfo",userInfo)
+					uni.setStorageSync("userInfo", userInfo)
 				})
 			}
 		}
 	}
 </script>
 
-<style lang="scss">
+<style lang="scss" scoped>
+	.content {
+		background: #fff;
+		margin: 20rpx;
+		padding: 0rpx 20rpx 0 20rpx;
+		border-radius: 20rpx;
 
-</style>
+		.bottom {
+			border-bottom: 1px solid #E6E6E6;
+		}
+	}
+</style>