Qukaidi 4 年之前
父节点
当前提交
8f9119e460
共有 3 个文件被更改,包括 187 次插入77 次删除
  1. 5 4
      pages/home/index.vue
  2. 4 3
      pages/me/index.vue
  3. 178 70
      pages/me/setting/setting.vue

+ 5 - 4
pages/home/index.vue

@@ -143,15 +143,16 @@
 					url: 'pages/home/my-stock/my-stock',
 				})
 			},
-			inMonthlyPolicy: function() {
+			inMonthlyPolicy() {
 				this.$u.route({
 					url: 'pages/home/monthly-policy/monthly-policy',
 				})
 			},
 			inInlineshop() {
-				this.$u.route({
-					url: 'pages/home/inline-shop/inline_shop',
-				})
+				this.$u.toast('线下订货暂不开放');
+				// this.$u.route({
+				// 	url: 'pages/home/inline-shop/inline_shop',
+				// })
 			},
 			inIntegral() {
 				this.$u.route({

+ 4 - 3
pages/me/index.vue

@@ -289,9 +289,10 @@
 				})
 			},
 			inCoupon() {
-				this.$u.route({
-					url: 'pages/me/coupon',
-				})
+				this.$u.toast('我的优惠券暂不开放');
+				// this.$u.route({
+				// 	url: 'pages/me/coupon',
+				// })
 			},
 			inSuppliers() {
 				this.$u.route({

+ 178 - 70
pages/me/setting/setting.vue

@@ -1,79 +1,187 @@
 <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">
-			<view slot="body">
-				<view class="u-flex  u-row-between">
-					<view class="">
-						<u-image width="130rpx" height="130rpx" src="../../../static/sailun/head-portrait-2.png" :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="收获地址管理">
-							<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="青岛赛轮轮胎店">
-							<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="张三">
-							<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="13443135664">
-							<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="1.29" :arrow="false" :border-bottom="false">
-							<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>
-	</view>
+  <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="1.00"
+              :arrow="false"
+              :border-bottom="false"
+            >
+              <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
+    >
+  </view>
 </template>
 
 <script>
-	import {mapMutations} from 'vuex'
-	export default {
-		data() {
-			return {
-
-			}
-		},
-		methods: {
-			...mapMutations(['logout']),
-			exit() {
-				this.logout()
-				this.$u.route({
-					url: "pages/login/index",
-					type: "reLaunch"
-				})
-			}
-		}
+import { mapMutations } from "vuex";
+import { request } from "../../../common/request/request";
+require("promise.prototype.finally").shim();
+export default {
+  data() {
+    return {
+      userInfo: {},
+    };
+  },
+  created() {
+    this.getMyinfo();
+  },
+  methods: {
+    ...mapMutations(["logout"]),
+    exit() {
+      this.logout();
+      this.$u.route({
+        url: "pages/login/index",
+        type: "reLaunch",
+      });
+    },
+    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>