erekook 7 hónapja
szülő
commit
89ea8f377b

+ 7 - 0
api/api.js

@@ -6,9 +6,12 @@ import {
   postWithCommonParams,
   uploadTrackLog,
   bookPlatformPost,
+  feedbackPost,
 } from "../utils/request";
 import { https, apple } from "../config/config.js";
 
+export const uploadUrl = https.goHttps + "/api/box/upload";
+
 export const userLogin = (data) => requestLogin(data);
 
 // 获取token
@@ -264,3 +267,7 @@ export function getRecCollectList(params) {
     return data;
   });
 }
+
+// 意见反馈提交
+export const addFeedback = (params) =>
+  feedbackPost("/private/userFeedback/addPro", params);

+ 4 - 2
app.json

@@ -10,7 +10,10 @@
     "pages/search/search",
     "pages/video/video",
     "pages/video/detail",
-    "pages/collect-video/video"
+    "pages/collect-video/video",
+    "pages/feedback/index",
+    "pages/feedback/success",
+    "pages/feedback/service"
   ],
   "window": {
     "navigationStyle": "custom",
@@ -69,4 +72,3 @@
   "sitemapLocation": "sitemap.json",
   "lazyCodeLoading": "requiredComponents"
 }
-

BIN
assets/images/icons/add.png


+ 281 - 0
pages/feedback/index.js

@@ -0,0 +1,281 @@
+import { addFeedback } from "../../api/api";
+import { apple } from "../../config/config";
+import { uploadImg, SendEvent } from "../../utils/util";
+const app = getApp();
+
+Page({
+  data: {
+    qsList: [
+      { label: "重复被打扰", value: 6 },
+      { label: "内容不喜欢", value: 1 },
+      { label: "拒绝再次入群", value: 7 },
+      { label: "其他问题", value: 4 },
+    ],
+    qsValue: "",
+    message: "",
+    contact: "",
+    imageList: [], // { path, url, status, message }
+    nickname: "",
+    submitLoading: false,
+    showNicknamePopup: false,
+    nextAction: "",
+  },
+
+  onLoad(options) {
+    if (!app.globalData.token) {
+      app.login().then(() => {});
+    }
+    this.reportEntrance();
+  },
+
+  clickQs(e) {
+    const qsValue = e.currentTarget.dataset.value;
+    this.setData({ qsValue });
+    this.reportSelectQuestion(qsValue);
+  },
+
+  onMessageInput(e) {
+    this.setData({ message: e.detail.value });
+  },
+
+  onContactInput(e) {
+    this.setData({ contact: e.detail.value });
+  },
+
+  onNickNameInput(e) {
+    this.setData({ nickname: e.detail.value });
+  },
+
+  // 选择图片
+  chooseImage() {
+    const _this = this;
+    const n = this.data.imageList.length;
+    if (n >= 9) {
+      wx.showToast({
+        title: "最多上传九张图片",
+        icon: "none",
+        duration: 2000,
+      });
+      return;
+    }
+    let imageList = this.data.imageList;
+    wx.chooseImage({
+      count: 9 - n,
+      sizeType: ["original", "compressed"],
+      sourceType: ["album", "camera"],
+      success: (res) => {
+        wx.showLoading({
+          title: "图片上传中",
+          mask: true,
+        });
+        let promiseList = [];
+        for (let i = 0; i < res.tempFiles.length; i++) {
+          promiseList.push(uploadImg(res.tempFiles[i].path));
+        }
+        wx.showLoading();
+        Promise.all(promiseList)
+          .then((results) => {
+            results.forEach((img) => {
+              imageList.push(img);
+            });
+            _this.setData({
+              imageList,
+            });
+            _this.reportSelectImage(imageList);
+          })
+          .catch(() => {
+            wx.showModal({
+              title: "友情提示",
+              content: "您上传的照片违规,请重新上传!",
+              showCancel: false,
+            });
+          })
+          .finally(() => {
+            wx.hideLoading();
+          });
+      },
+    });
+  },
+
+  deleteImage(e) {
+    const index = e.currentTarget.dataset.index;
+    const list = this.data.imageList;
+    list.splice(index, 1);
+    this.setData({ imageList: list });
+  },
+
+  confirm() {
+    if (!this.data.qsValue) {
+      wx.showToast({ title: "请选择问题类型", icon: "none" });
+      return;
+    }
+    if (this.data.imageList.length === 0) {
+      wx.showToast({ title: "请上传群截图", icon: "none" });
+      return;
+    }
+
+    this.setData({ showNicknamePopup: true, nextAction: "submit" });
+  },
+
+  async submitFeedbackWithNickname() {
+    if (!this.data.nickname) {
+      wx.showToast({ title: "请输入昵称", icon: "none" });
+      return;
+    }
+
+    if (this.data.nextAction === "service") {
+      await this.submitServiceWithNickname();
+      return;
+    }
+
+    const param = {
+      feedType: this.data.qsValue,
+      images: this.data.imageList.join(","),
+      description: this.data.message,
+      contact: this.data.contact,
+      type: 3,
+      appId: apple.appid,
+      nickname: this.data.nickname,
+      ...app.globalData.queryData,
+    };
+
+    param.unionId = app.globalData.unionId || "";
+    param.openId = app.globalData.openId || "";
+
+    this.setData({ submitLoading: true });
+
+    this.reportSubmitFeedback();
+
+    addFeedback(param)
+      .then(() => {
+        wx.redirectTo({ url: "/pages/feedback/success" });
+      })
+      .catch((err) => {
+        wx.showToast({ title: err.msg || "提交失败", icon: "none" });
+      })
+      .finally(() => {
+        this.setData({ submitLoading: false });
+        this.setData({ showNicknamePopup: false });
+        this.setData({ nextAction: "" });
+      });
+  },
+  async clickService() {
+    this.setData({ showNicknamePopup: true, nextAction: "service" });
+  },
+
+  // ---------- 埋点 ----------
+  getBaseEventParams() {
+    const {
+      employeeId = "",
+      corpId = "",
+      taskId = "",
+    } = app.globalData.queryData || {};
+    return {
+      employee_id: employeeId,
+      corp_id: corpId,
+      task_id: taskId,
+    };
+  },
+
+  reportEntrance() {
+    SendEvent("feedback_page_entrance", {
+      ...this.getBaseEventParams(),
+    });
+  },
+
+  reportSelectQuestion(qsValue) {
+    SendEvent("select_question_type", {
+      ...this.getBaseEventParams(),
+      question_type: qsValue,
+    });
+  },
+
+  reportSelectImage(imageList) {
+    SendEvent("select_image", {
+      ...this.getBaseEventParams(),
+      image_url: (imageList || []).join(";"),
+    });
+  },
+
+  reportSubmitFeedback() {
+    SendEvent("submit_feedback", {
+      ...this.getBaseEventParams(),
+      question_type: this.data.qsValue,
+      image_url: (this.data.imageList || []).join(";"),
+      description: this.data.message,
+      contact: this.data.contact,
+      nickname: this.data.nickname,
+    });
+  },
+
+  reportClickOnlineCustomer() {
+    SendEvent("click_online_customer", {
+      ...this.getBaseEventParams(),
+      question_type: this.data.qsValue,
+      image_url: (this.data.imageList || []).join(";"),
+      description: this.data.message,
+      contact: this.data.contact,
+      nickname: this.data.nickname,
+    });
+  },
+
+  onCancelNickname() {
+    this.setData({ showNicknamePopup: false, nextAction: "" });
+  },
+
+  async submitServiceWithNickname() {
+    const param = {
+      feedType: 99,
+      images: this.data.imageList.join(","),
+      description: this.data.message,
+      contact: this.data.contact,
+      type: 3,
+      appId: apple.appid,
+      nickname: this.data.nickname,
+      ...app.globalData.queryData,
+    };
+
+    param.unionId = app.globalData.unionId || "";
+    param.openId = app.globalData.openId || "";
+
+    this.setData({ submitLoading: true });
+    try {
+      await addFeedback(param);
+      this.reportClickOnlineCustomer();
+      if (apple.appid === "wx7b6f62f800f10d3f") {
+        wx.navigateTo({
+          url: "/pages/feedback/service",
+          success: (res) => {
+            console.log("Navigate success");
+          },
+          fail: (err) => {
+            console.error("Navigate failed", err);
+          },
+        });
+      } else {
+        wx.navigateToMiniProgram({
+          appId: "wx7b6f62f800f10d3f",
+          path: "/pages/feedback/service",
+          success(res) {
+            console.log("跳转成功", res);
+          },
+          fail(err) {
+            console.error("跳转失败", err);
+            wx.showToast({
+              title: "跳转失败",
+              icon: "none",
+            });
+          },
+        });
+      }
+    } catch (error) {
+      wx.showToast({ title: "提交失败", icon: "none" });
+    } finally {
+      this.setData({
+        submitLoading: false,
+        showNicknamePopup: false,
+        nextAction: "",
+      });
+    }
+  },
+});

+ 5 - 0
pages/feedback/index.json

@@ -0,0 +1,5 @@
+{
+  "usingComponents": {},
+  "navigationStyle": "default"
+}
+

+ 79 - 0
pages/feedback/index.wxml

@@ -0,0 +1,79 @@
+<view class="f-container">
+  <!-- 标题 -->
+  <view class="header">
+    <view class="title">意见反馈</view>
+    <view class="desc">给出您的建议吧~</view>
+  </view>
+
+  <!-- 问题类型 -->
+  <view class="block">
+    <view class="block-title">
+      选择问题类型 <text class="required">*</text>
+    </view>
+    <view class="qs-list">
+      <view class="qs-item {{qsValue == item.value ? 'active' : ''}}" bindtap="clickQs" data-value="{{item.value}}"
+        wx:for="{{qsList}}" wx:key="value">
+        {{item.label}}
+      </view>
+    </view>
+  </view>
+
+  <!-- 问题描述 -->
+  <view class="block">
+    <view class="block-title">问题描述</view>
+    <textarea class="textarea" placeholder="请详细描述遇到的问题以便尽快定位并解决问题。" placeholder-style="color:#c8c9cc"
+      value="{{message}}" bindinput="onMessageInput" maxlength="500" auto-height />
+    <view class="word-limit">{{message.length}}/500</view>
+  </view>
+
+  <!-- 上传截图 -->
+  <view class="block">
+    <view class="block-title">
+      请上传群截图 <text class="required">*</text>
+    </view>
+    <view class="uploader">
+      <view class="upload-grid">
+        <block wx:for="{{imageList}}" wx:key="index">
+          <view class="image-item">
+            <!-- 上传成功 -->
+            <image src="{{item}}" mode="aspectFill" class="img" />
+            <!-- 删除按钮 -->
+            <image class="delete" src="/assets/images/icons/close.png" catchtap="deleteImage" data-index="{{index}}"></image>
+          </view>
+        </block>
+
+        <!-- 添加按钮(最多9张) -->
+        <view class="add-btn" catchtap="chooseImage" wx:if="{{imageList.length < 9}}">
+          <image class="icon-add" src="/assets/images/icons/add.png"></image>
+        </view>
+      </view>
+      <view class="upload-tip">上传问题截图可以让问题快速解决!</view>
+    </view>
+  </view>
+
+  <!-- 联系方式 -->
+  <view class="block">
+    <view class="block-title">联系方式</view>
+    <input class="contact-input" placeholder="手机号、QQ、邮箱,以便我们回复您" placeholder-style="color:#c8c9cc" value="{{contact}}"
+      bindinput="onContactInput" />
+  </view>
+
+  <!-- 提交按钮 -->
+  <view class="footer">
+    <button class="btn-primary" loading="{{submitLoading}}" bindtap="confirm">确定</button>
+    <button class="btn-service" bindtap="clickService" >联系客服</button>
+  </view>
+</view>
+
+<!-- 昵称弹窗 -->
+<view class="popup-mask" wx:if="{{showNicknamePopup}}" catchtouchmove="true">
+  <view class="popup-panel">
+    <view class="popup-title">选择您的微信昵称,继续提交</view>
+    <view class="popup-body">
+      <input type="nickname" class="popup-input" placeholder="请输入昵称" value="{{nickname}}" bindinput="onNickNameInput" />
+    </view>
+    <view class="popup-footer">
+      <button class="popup-btn confirm" loading="{{submitLoading}}" bindtap="submitFeedbackWithNickname">确认提交</button>
+    </view>
+  </view>
+</view>

+ 250 - 0
pages/feedback/index.wxss

@@ -0,0 +1,250 @@
+/* pages/feedback/index.wxss */
+.f-container {
+  box-sizing: border-box;
+}
+
+.f-container {
+  height: 100vh;
+  overflow: hidden;
+  overflow-y: scroll;
+  background: #f7f7f7;
+}
+
+.header {
+  padding: 40rpx 32rpx 30rpx;
+  background: #fff;
+}
+
+.header .title {
+  font-size: 36rpx;
+  font-weight: bold;
+  color: #333;
+}
+
+.header .desc {
+  font-size: 28rpx;
+  color: #666;
+  margin-top: 16rpx;
+}
+
+.block {
+  margin-top: 20rpx;
+  background: #fff;
+  padding: 32rpx;
+}
+
+.block-title {
+  font-size: 30rpx;
+  font-weight: bold;
+  color: #333;
+  margin-bottom: 24rpx;
+}
+
+.required {
+  color: #f44;
+}
+
+.qs-list {
+  display: flex;
+  flex-wrap: wrap;
+}
+
+.qs-item {
+  padding: 12rpx 28rpx;
+  margin: 0 24rpx 24rpx 0;
+  border: 2rpx solid #999;
+  border-radius: 8rpx;
+  font-size: 28rpx;
+  color: #333;
+}
+
+.qs-item.active {
+  border-color: #276fff;
+  color: #276fff;
+  background: rgba(39, 111, 255, 0.08);
+}
+
+.textarea {
+  width: 100%;
+  min-height: 240rpx;
+  padding: 20rpx;
+  background: #f9f9f9;
+  border-radius: 8rpx;
+  font-size: 30rpx;
+  line-height: 48rpx;
+}
+
+.word-limit {
+  text-align: right;
+  font-size: 24rpx;
+  color: #999;
+  margin-top: 12rpx;
+}
+
+.uploader {
+  margin-top: 20rpx;
+}
+
+.upload-grid {
+  display: flex;
+  flex-wrap: wrap;
+}
+
+.image-item,
+.add-btn {
+  position: relative;
+  width: 180rpx;
+  height: 180rpx;
+  margin-right: 20rpx;
+  margin-bottom: 20rpx;
+  border-radius: 12rpx;
+  overflow: hidden;
+  background: #f5f5f5;
+}
+
+.image-item .img {
+  width: 100%;
+  height: 100%;
+}
+
+.uploading {
+  width: 100%;
+  height: 100%;
+  background: rgba(0, 0, 0, 0.6);
+  color: #fff;
+  font-size: 24rpx;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  text-align: center;
+  padding: 20rpx;
+}
+
+.delete {
+  position: absolute;
+  right: 0rpx;
+  top: 0rpx;
+  width: 30rpx;
+  height: 30rpx;
+}
+
+.add-btn {
+  border: 2rpx dashed #ccc;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+}
+
+.icon-add {
+  width: 40rpx;
+  height: 40rpx;
+  font-size: 80rpx;
+}
+
+.upload-tip {
+  font-size: 24rpx;
+  color: #999;
+  margin-top: 16rpx;
+}
+
+.contact-input {
+  height: 88rpx;
+  padding: 0 20rpx;
+  background: #f9f9f9;
+  border-radius: 8rpx;
+  font-size: 30rpx;
+}
+
+.footer {
+  padding: 30rpx 30rpx 60rpx 30rpx;
+  background: #fff;
+  justify-content: space-between;
+  display: flex;
+}
+
+.btn-primary {
+  width: 330rpx !important;
+  height: 96rpx;
+  line-height: 2;
+  background: #276fff;
+  color: #fff;
+  border-radius: 12rpx;
+  font-size: 32rpx;
+}
+
+.btn-service {
+  width: 330rpx !important;
+  height: 96rpx;
+  line-height: 2;
+  color: #333;
+  border-radius: 12rpx;
+  font-size: 32rpx;
+  background: #efefef;
+  margin-left: 30rpx;
+}
+
+/* 昵称弹窗 */
+.popup-mask {
+  position: fixed;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+  background: rgba(0, 0, 0, 0.5);
+  display: flex;
+  align-items: flex-end;
+  justify-content: center;
+  z-index: 999;
+}
+
+.popup-panel {
+  width: 640rpx;
+  background: #fff;
+  border-radius: 20rpx;
+  overflow: hidden;
+  box-shadow: 0 16rpx 40rpx rgba(0, 0, 0, 0.08);
+  margin-bottom: 100rpx;
+}
+
+.popup-title {
+  padding: 32rpx;
+  font-size: 32rpx;
+  font-weight: 600;
+  color: #333;
+  text-align: center;
+}
+
+.popup-body {
+  padding: 0 32rpx 32rpx;
+}
+
+.popup-input {
+  width: 100%;
+  height: 88rpx;
+  padding: 0 24rpx;
+  box-sizing: border-box;
+  background: #f7f7f7;
+  border-radius: 12rpx;
+  font-size: 30rpx;
+}
+
+.popup-footer {
+  display: block;
+  border-top: 1rpx solid #f1f1f1;
+  padding: 20rpx 0;
+}
+
+.popup-btn {
+  width: 100%;
+  border: none;
+  border-radius: 0;
+  height: 80rpx;
+  line-height: 1.8;
+  font-size: 30rpx;
+}
+
+.popup-btn.confirm {
+  background: #276fff;
+  color: #fff;
+  border-radius: 12rpx;
+}

+ 70 - 0
pages/feedback/service.js

@@ -0,0 +1,70 @@
+// pages/feedback/service.js
+Page({
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    problemList: [
+      { label: "重复被打扰", value: 6 },
+      { label: "内容不喜欢", value: 1 },
+      { label: "拒绝再次入群", value: 7 },
+      { label: "其他问题", value: 4 },
+    ],
+  },
+
+  /**
+   * 点击问题卡片
+   */
+  onProblemClick(e) {
+    const problem = e.currentTarget.dataset.problem;
+    console.log("选择的问题:", problem);
+    wx.openCustomerServiceChat({
+      extInfo: { url: "https://work.weixin.qq.com/kfid/kfce7acee997bb78043" },
+      corpId: "wwbec5bdc74bc37e2b",
+      success(res) {},
+      fail(err) {
+        console.log(err);
+      },
+    });
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {},
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {},
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {},
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {},
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {},
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {},
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {},
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {},
+});

+ 5 - 0
pages/feedback/service.json

@@ -0,0 +1,5 @@
+{
+  "navigationBarTitleText": "客服中心",
+  "usingComponents": {}
+}
+

+ 36 - 0
pages/feedback/service.wxml

@@ -0,0 +1,36 @@
+<view class="container">
+  <!-- 问候语 -->
+  <view class="greeting">
+    你好,请选择需要咨询的问题
+  </view>
+
+  <!-- 问题列表 -->
+  <view class="problem-list">
+    <view 
+      class="problem-card" 
+      wx:for="{{problemList}}" 
+      wx:key="value"
+      bindtap="onProblemClick"
+      data-problem="{{item.label}}"
+    >
+      <!-- 聊天图标 -->
+      <view class="icon-wrapper">
+        <view class="chat-icon">
+          <view class="chat-bubble"></view>
+          <view class="chat-dots">
+            <view class="dot"></view>
+            <view class="dot"></view>
+            <view class="dot"></view>
+          </view>
+        </view>
+      </view>
+      
+      <!-- 问题内容 -->
+      <view class="problem-content">
+        <view class="problem-title">{{item.label}}</view>
+        <view class="problem-hint">点此联系客服处理问题</view>
+      </view>
+    </view>
+  </view>
+</view>
+

+ 95 - 0
pages/feedback/service.wxss

@@ -0,0 +1,95 @@
+/* pages/feedback/service.wxss */
+.container {
+  min-height: 100vh;
+  background: #ffffff;
+  padding: 40rpx 32rpx;
+  box-sizing: border-box;
+}
+
+.greeting {
+  font-size: 30rpx;
+  color: #333333;
+  margin-bottom: 40rpx;
+}
+
+.problem-list {
+  display: flex;
+  flex-direction: column;
+  gap: 24rpx;
+}
+
+.problem-card {
+  display: flex;
+  align-items: center;
+  background: #f5f5f5;
+  border-radius: 16rpx;
+  padding: 32rpx;
+  box-sizing: border-box;
+}
+
+.icon-wrapper {
+  margin-right: 24rpx;
+  flex-shrink: 0;
+}
+
+.chat-icon {
+  position: relative;
+  width: 80rpx;
+  height: 80rpx;
+}
+
+.chat-bubble {
+  width: 80rpx;
+  height: 80rpx;
+  background: #6b56fe;
+  border-radius: 16rpx 16rpx 16rpx 4rpx;
+  position: relative;
+}
+
+.chat-bubble::after {
+  content: "";
+  position: absolute;
+  bottom: -8rpx;
+  left: 0;
+  width: 0;
+  height: 0;
+  border-left: 12rpx solid #6b56fe;
+  border-top: 8rpx solid transparent;
+  border-bottom: 8rpx solid transparent;
+}
+
+.chat-dots {
+  position: absolute;
+  top: 50%;
+  left: 50%;
+  transform: translate(-50%, -50%);
+  display: flex;
+  gap: 8rpx;
+  align-items: center;
+  justify-content: center;
+}
+
+.dot {
+  width: 12rpx;
+  height: 12rpx;
+  background: #fff;
+  border-radius: 50%;
+}
+
+.problem-content {
+  flex: 1;
+  display: flex;
+  flex-direction: column;
+}
+
+.problem-title {
+  font-size: 32rpx;
+  font-weight: bold;
+  color: #333333;
+  margin-bottom: 12rpx;
+}
+
+.problem-hint {
+  font-size: 24rpx;
+  color: #999999;
+}

+ 59 - 0
pages/feedback/success.js

@@ -0,0 +1,59 @@
+// pages/feedback/success.js
+Page({
+  /**
+   * 页面的初始数据
+   */
+  data: {},
+
+  onClickBtn() {
+    wx.redirectTo({
+      url: "/pages/mix/index",
+      success: (res) => {
+        console.log("Redirect success");
+      },
+      fail: (err) => {
+        console.error("Redirect failed", err);
+      },
+    });
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {},
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {},
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {},
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {},
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {},
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {},
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {},
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {},
+});

+ 5 - 0
pages/feedback/success.json

@@ -0,0 +1,5 @@
+{
+  "usingComponents": {},
+  "navigationStyle": "default"
+}
+

+ 22 - 0
pages/feedback/success.wxml

@@ -0,0 +1,22 @@
+<!--pages/feedback/success.wxml-->
+<view class="complaint-result">
+  <!-- 成功图标 -->
+  <view class="icon-wrapper">
+    <image
+      src="/assets/images/icons/submit-ok.png"
+      mode="widthFix"
+      class="success-img"
+    />
+  </view>
+
+  <!-- 文字说明 -->
+  <view class="text-wrapper">
+    <text class="title">您的反馈已提交成功</text>
+    <text class="tip">相关工作人员将在7个工作日内处理</text>
+
+    <!-- 返回按钮 -->
+    <view class="btn-close" bindtap="onClickBtn">
+      返回
+    </view>
+  </view>
+</view>

+ 51 - 0
pages/feedback/success.wxss

@@ -0,0 +1,51 @@
+/* pages/feedback/success.wxss */
+.complaint-result {
+  min-height: 100vh;
+  background: #f7f7f7;
+  padding-top: 120rpx;
+  box-sizing: border-box;
+}
+
+.icon-wrapper {
+  text-align: center;
+  margin-bottom: 80rpx;
+}
+
+.success-img {
+  width: 400rpx;
+  height: auto;
+}
+
+/* 文字区域 */
+.text-wrapper {
+  text-align: center;
+  padding: 0 60rpx;
+}
+
+.title {
+  display: block;
+  font-size: 40rpx;
+  font-weight: bold;
+  color: #333;
+  margin-bottom: 32rpx;
+}
+
+.tip {
+  display: block;
+  font-size: 32rpx;
+  color: #666;
+  margin-bottom: 100rpx;
+}
+
+/* 返回按钮 */
+.btn-close {
+  width: 60%;
+  margin: 0 auto;
+  height: 88rpx;
+  line-height: 88rpx;
+  background: #1b8edb;
+  color: #fff;
+  font-size: 34rpx;
+  border-radius: 12rpx;
+}
+

+ 9 - 2
project.private.config.json

@@ -24,11 +24,18 @@
     "miniprogram": {
       "list": [
         {
+          "name": "pages/feedback/index",
+          "pathName": "pages/feedback/index",
+          "query": "",
+          "scene": null,
+          "launchMode": "default"
+        },
+        {
           "name": "视频直跳播放",
           "pathName": "pages/video/video",
           "query": "shared_video_id=419109&tag_id=2336&share_count=1&type=tuiguang&jump=1",
-          "scene": 1007,
-          "launchMode": "default"
+          "launchMode": "default",
+          "scene": 1007
         },
         {
           "name": "合集视频",

+ 6 - 0
utils/request.js

@@ -259,3 +259,9 @@ export function postWithCommonParams(url, body, method = "POST") {
   }
 }
 
+export function feedbackPost(url, body) {
+  if (!body) {
+    body = {};
+  }
+  return post("https://moka-private-pangu.mokamrp.com" + url, body);
+}

+ 29 - 1
utils/util.js

@@ -1,4 +1,4 @@
-import { recordLog } from "../api/api.js";
+import { recordLog, uploadUrl } from "../api/api.js";
 import { apple } from "../config/config";
 
 const formatTime = (date) => {
@@ -184,6 +184,33 @@ export const uuid = function () {
   return uuid;
 };
 
+export const uploadImg = (img) => {
+  return new Promise((resolve, reject) => {
+    wx.uploadFile({
+      url: uploadUrl,
+      filePath: img,
+      name: "file",
+      formData: {
+        uuid: "fuck",
+        gh_id: apple.ghid,
+      },
+      success: function (t) {
+        let result = JSON.parse(t.data);
+        console.log(result);
+        if (result.code == 200) {
+          resolve(result.data[0]);
+        } else {
+          reject();
+        }
+      },
+      fail: function (t) {
+        console.log(t);
+        reject(t);
+      },
+    });
+  });
+};
+
 module.exports = {
   formatTime,
   goToBookDetail,
@@ -192,4 +219,5 @@ module.exports = {
   deepCopy,
   SendEvent,
   goToVideoDetail,
+  uploadImg,
 };