Procházet zdrojové kódy

🔥 意见反馈:移除相关功能,暂时不考虑

YunaiV před 1 rokem
rodič
revize
d63bbf9dc3

+ 0 - 12
pages.json

@@ -472,18 +472,6 @@
             "group": "通用"
           }
         },
-        {
-          "path": "feedback",
-          "style": {
-            "navigationBarTitleText": "问题反馈"
-          },
-          "meta": {
-            "auth": true,
-            "sync": true,
-            "title": "问题反馈",
-            "group": "通用"
-          }
-        },
         {
           "path": "richtext",
           "style": {

+ 0 - 226
pages/public/feedback.vue

@@ -1,226 +0,0 @@
-<template>
-  <s-layout class="set-wrap" title="问题反馈">
-    <uni-forms ref="form" :modelValue="state.formData" border>
-      <view class="bg-white type-box ss-p-x-20 ss-p-y-30">
-        <view class="title ss-m-b-44">请选择类型</view>
-        <view class="ss-m-l-12">
-          <radio-group @change="radioChange">
-            <label
-              class="ss-flex ss-col-center ss-m-b-40"
-              v-for="item in state.radioList"
-              :key="item.type"
-            >
-              <radio :value="item.type" color="var(--ui-BG-Main)" style="transform: scale(0.8)" />
-              <view class="radio-subtitle">{{ item.type }}</view>
-            </label>
-          </radio-group>
-        </view>
-      </view>
-      <view class="bg-white ss-p-x-20 ss-p-y-30 ss-m-t-20">
-        <view class="title ss-m-b-30"> 相关描述 </view>
-        <view class="textarea">
-          <uni-easyinput
-            :inputBorder="false"
-            type="textarea"
-            v-model="state.formData.content"
-            placeholderStyle="color:#BBBBBB;font-size:30rpx;font-weight:400;line-height:normal"
-            placeholder="客官~请描述您遇到的问题,建议上传照片"
-            clearable
-          ></uni-easyinput>
-          <s-uploader
-            v-model:url="state.formData.images"
-            fileMediatype="image"
-            limit="9"
-            mode="grid"
-            :imageStyles="{ width: '168rpx', height: '168rpx' }"
-          ></s-uploader>
-        </view>
-      </view>
-      <view class="bg-white ss-p-x-20 ss-p-y-30 ss-m-t-20">
-        <view class="title ss-m-b-30"> 联系方式 </view>
-        <view class="mobile-box">
-          <uni-easyinput
-            :inputBorder="false"
-            type="number"
-            v-model="state.formData.phone"
-            paddingLeft="10"
-            placeholder="请输入您的联系电话"
-          />
-        </view>
-      </view>
-    </uni-forms>
-    <su-fixed bottom placeholder>
-      <view class="ss-flex ss-row-between ss-p-x-30 ss-p-y-10">
-        <button class="kefu-btn ss-reset-button" @tap="sheep.$router.go('/pages/chat/index')">
-          联系客服
-        </button>
-        <button class="submit-btn ss-reset-button ui-BG-Main ui-Shadow-Main" @tap="onSubmit">
-          提交
-        </button>
-      </view>
-    </su-fixed>
-  </s-layout>
-</template>
-
-<script setup>
-  import { onLoad } from '@dcloudio/uni-app';
-  import { computed, reactive, ref, unref } from 'vue';
-  import sheep from '@/sheep';
-
-  const filesRef = ref(null);
-  const state = reactive({
-    radioList: [
-      {
-        type: '产品功能问题反馈',
-      },
-      {
-        type: '建议及意见反馈',
-      },
-      {
-        type: '投诉客服其他问题',
-      },
-    ],
-    formData: {
-      content: '',
-      phone: '',
-      images: [],
-      type: '',
-    },
-    imageFiles: [],
-    current: 0,
-  });
-
-  async function onSubmit() {
-    if (!state.formData.type) {
-      sheep.$helper.toast('请选择类型');
-      return;
-    }
-    if (!state.formData.content) {
-      sheep.$helper.toast('请描述您遇到的问题');
-      return;
-    }
-    if (!state.formData.phone) {
-      sheep.$helper.toast('请输入您的联系方式');
-      return;
-    }
-
-    const { error } = await sheep.$api.app.feedback(state.formData);
-    if (error === 0) {
-      sheep.$router.back();
-    }
-  }
-
-  function radioChange(e) {
-    state.formData.type = e.detail.value;
-  }
-</script>
-
-<style lang="scss" scoped>
-  .type-box {
-    border-top: 2rpx solid #f9fafb;
-  }
-
-  .uni-forms {
-    width: 100%;
-  }
-
-  .title {
-    font-size: 30rpx;
-    font-weight: bold;
-    color: #333333;
-    line-height: normal;
-  }
-
-  :deep() {
-    .uni-easyinput__placeholder-class {
-      color: #bbbbbb !important;
-      font-size: 28rpx !important;
-      font-weight: 400 !important;
-      line-height: normal !important;
-    }
-
-    .uni-forms-item__label .label-text {
-      font-size: 28rpx !important;
-      color: #333333 !important;
-      line-height: normal !important;
-    }
-
-    .uni-list-item__content-title {
-      font-size: 28rpx !important;
-      color: #333333 !important;
-      line-height: normal !important;
-    }
-
-    .uni-easyinput__content-textarea {
-      font-size: 28rpx !important;
-      color: #333333 !important;
-      line-height: normal !important;
-      margin-top: 4rpx !important;
-      padding-left: 20rpx !important;
-    }
-
-    .uni-icons {
-      font-size: 40rpx !important;
-    }
-
-    .icon-del-box {
-      width: 32rpx;
-      height: 32rpx;
-      top: 0;
-      right: 0;
-
-      .icon-del {
-        width: 24rpx;
-      }
-    }
-  }
-
-  .radio-subtitle {
-    font-size: 28rpx;
-    font-weight: 500;
-    color: #333333;
-    line-height: 42rpx;
-  }
-
-  .textarea {
-    min-height: 322rpx;
-    background: #f9fafb;
-    border-radius: 20rpx;
-    padding: 20rpx;
-    margin: 30rpx 20rpx 46rpx 0;
-
-    .area {
-      height: 238rpx;
-      font-size: 26rpx;
-      font-weight: 500;
-      color: #333;
-      line-height: 50rpx;
-      width: 100%;
-    }
-
-    .pl-style {
-      font-size: 24rpx;
-      color: #b1b3c7;
-      font-weight: 500;
-    }
-  }
-
-  .mobile-box {
-    background: #f9fafb;
-    border-radius: 20rpx;
-  }
-
-  .submit-btn {
-    width: 334rpx;
-    height: 74rpx;
-    border-radius: 37rpx;
-  }
-
-  .kefu-btn {
-    width: 334rpx;
-    height: 74rpx;
-    border-radius: 37rpx;
-    background: #eeeeee;
-    color: #333333;
-  }
-</style>

+ 0 - 8
pages/public/setting.vue

@@ -27,14 +27,6 @@
           :border="false"
           class="list-border"
         ></uni-list-item>
-        <uni-list-item
-          title="意见反馈"
-          showArrow
-          clickable
-          :border="false"
-          class="list-border"
-          @tap="sheep.$router.go('/pages/public/feedback')"
-        ></uni-list-item>
         <uni-list-item
           title="关于我们"
           showArrow

+ 18 - 12
pages/user/info.vue

@@ -1,3 +1,4 @@
+<!-- 用户信息 -->
 <template>
   <s-layout title="用户信息" class="set-userinfo-wrap">
     <uni-forms
@@ -18,7 +19,7 @@
             :width="160"
             :radius="80"
             mode="scaleToFill"
-          ></su-image>
+          />
           <view class="avatar-action">
             <!-- #ifdef MP -->
             <button
@@ -208,7 +209,7 @@
   import { showAuthModal } from '@/sheep/hooks/useModal';
 
   const state = reactive({
-    model: {},
+    model: {}, // 个人信息
     rules: {},
     thirdOauthInfo: null,
   });
@@ -232,26 +233,28 @@
 
   const userInfo = computed(() => sheep.$store('user').userInfo);
 
-  // 选择性别
+  // 选择性别 TODO
   function onChangeGender(e) {
     state.model.gender = e.detail.value;
   }
-  // 修改用户名
+
+  // 修改用户名 TODO
   const onChangeUsername = () => {
     !state.model.verification?.username && showAuthModal('changeUsername');
   };
 
-  // 修改手机号
+  // 修改手机号 TODO
   const onChangeMobile = () => {
     showAuthModal('changeMobile');
   };
 
+  // TODO 芋艿:
   function onChooseAvatar(e) {
     const tempUrl = e.detail.avatarUrl || '';
     uploadAvatar(tempUrl);
   }
 
-  //修改头像
+  // 修改头像 TODO
   function onChangeAvatar() {
     uni.chooseImage({
       success: async (chooseImageRes) => {
@@ -261,13 +264,14 @@
     });
   }
 
+  // TODO
   async function uploadAvatar(tempUrl) {
     if (!tempUrl) return;
     let { path } = await sheep.$api.app.upload(tempUrl, 'ugc');
     state.model.avatar = path;
   }
 
-  // 修改/设置密码
+  // 修改/设置密码 TODO
   function onSetPassword() {
     if (state.model.verification.password) {
       showAuthModal('changePassword');
@@ -276,7 +280,7 @@
     }
   }
 
-  // 绑定第三方账号
+  // 绑定第三方账号 TODO
   async function bindThirdOauth() {
     let result = await sheep.$platform.useProvider('wechat').bind();
     if (result) {
@@ -284,7 +288,7 @@
     }
   }
 
-  // 解绑第三方账号
+  // 解绑第三方账号 TODO
   function unBindThirdOauth() {
     uni.showModal({
       title: '解绑提醒',
@@ -302,7 +306,7 @@
     });
   }
 
-  // 保存信息
+  // 保存信息 TODO
   async function onSubmit() {
     // const { error, data } = await sheep.$api.user.update({
     //   avatar: state.model.avatar,
@@ -319,13 +323,14 @@
     }
   }
 
+  // TODO
   const getUserInfo = async () => {
     const userInfo = await sheep.$store('user').getInfo();
     state.model = clone(userInfo);
 
     if (sheep.$platform.name !== 'H5') {
-		return;
-		// 这个先注释,要不然小程序保存个人信息有问题,
+		  return;
+		  // 这个先注释,要不然小程序保存个人信息有问题,
       let { data, error } = await sheep.$api.user.thirdOauthInfo();
       if (error === 0) {
         state.thirdOauthInfo = data;
@@ -333,6 +338,7 @@
     }
   };
 
+  // TODO
   onBeforeMount(async () => {
     getUserInfo();
   });

+ 0 - 7
sheep/api/app.js

@@ -50,13 +50,6 @@ export default {
         loadingMsg: '发送中',
       },
     }),
-  //意见反馈
-  feedback: (data) =>
-    request({
-      url: 'feedback',
-      method: 'POST',
-      data,
-    }),
   // 自定义页面
   page: (id) =>
     request({

+ 0 - 5
sheep/components/s-menu-tools/s-menu-tools.vue

@@ -63,11 +63,6 @@
       icon: '/static/img/shop/tools/collect.png',
       title: '我的收藏',
     },
-    {
-      url: '/pages/public/feedback',
-      icon: '/static/img/shop/tools/feedback.png',
-      title: '意见反馈',
-    },
     {
       url: '/pages/chat/index',
       icon: '/static/img/shop/tools/service.png',