소스 검색

个人中心显示客服电话

shmily1213 3 주 전
부모
커밋
5af82314f1
4개의 변경된 파일36개의 추가작업 그리고 7개의 파일을 삭제
  1. 3 3
      package.json
  2. 1 1
      src/components/ie-picker/ie-picker.vue
  3. 31 2
      src/pagesMain/pages/me/components/me-menu.vue
  4. 1 1
      src/uni_modules/uv-cell/components/uv-cell/uv-cell.vue

+ 3 - 3
package.json

@@ -1,10 +1,10 @@
 {
   "name": "ie-plus",
-  "version": "0.0.0",
+  "version": "1.0.0",
   "scripts": {
     "server": "uni -p",
-    "dev": "uni -p h5-dev",
-    "dev:h5": "uni -p h5-dev",
+    "dev": "uni -p h5-dev --host",
+    "dev:h5": "uni -p h5-dev --host",
     "dev:mp": "uni -p mp-dev",
     "build": "uni build -p",
     "build:h5": "uni build pro-h5",

+ 1 - 1
src/components/ie-picker/ie-picker.vue

@@ -1,6 +1,6 @@
 <template>
   <view class="w-full" @click="handleClick">
-    <view class="flex items-center gap-x-6" :style="customStyle">
+    <view class="flex items-center gap-x-6 justify-end" :style="customStyle">
       <view v-if="matchValue || customLabel" class="text-fore-title flex-1 min-w-1 ellipsis-1" :style="getValueStyle"
         :class="{ 'text-[#dce4f6]': disabled || readonly }">
         <slot :label="label">

+ 31 - 2
src/pagesMain/pages/me/components/me-menu.vue

@@ -9,7 +9,7 @@
         </view>
       </view>
       <view class="mt-40 text-30 text-fore-title font-bold">其他功能</view>
-      <view class="mt-16 shadow-card rounded-8 py-10 bg-white">
+      <view class="mt-16 shadow-card rounded-8 bg-white">
         <uv-cell-group :border="false">
           <uv-cell isLink :cellStyle="cellStyle"
             @click="handleNavigate('/pagesSystem/pages/edit-profile/edit-profile', '基本资料')">
@@ -20,7 +20,7 @@
               </view>
             </template>
           </uv-cell>
-          <uv-cell isLink :cellStyle="cellStyle" @click="handleQuestion" :border="false">
+          <uv-cell isLink :cellStyle="cellStyle" @click="handleQuestion" :border="true">
             <template #title>
               <view class="flex items-center gap-x-10">
                 <uv-icon name="question-circle" size="16" color="#888888" />
@@ -28,6 +28,17 @@
               </view>
             </template>
           </uv-cell>
+          <uv-cell isLink :cellStyle="cellStyle" @click="handlePhone" :border="false">
+            <template #title>
+              <view class="flex items-center gap-x-10">
+                <uv-icon name="phone" size="17" color="#888888" />
+                <text class="text-30 text-fore-subtitle">客服电话</text>
+              </view>
+            </template>
+            <template #value>
+              <text class="text-30 text-fore-subtitle">{{ contactPhone }}</text>
+            </template>
+          </uv-cell>
         </uv-cell-group>
       </view>
     </view>
@@ -42,6 +53,8 @@ import { useUserStore } from '@/store/userStore';
 const { transferTo } = useTransferPage();
 const userStore = useUserStore();
 
+const contactPhone = computed(() => userStore.orgInfo.contactPhone);
+
 type MenuItem = {
   name: string;
   icon: string;
@@ -108,5 +121,21 @@ const handleLogout = async () => {
 
   }
 }
+const handlePhone = async () => {
+  if (!contactPhone.value) {
+    uni.$ie.showToast('暂无客服电话');
+    return;
+  } else {
+    uni.showActionSheet({
+      title: '客服电话',
+      itemList: [`拨打电话:${contactPhone.value}`],
+      success: (res) => {
+        uni.makePhoneCall({
+          phoneNumber: contactPhone.value
+        });
+      }
+    });
+  }
+}
 </script>
 <style lang="scss" scoped></style>

+ 1 - 1
src/uni_modules/uv-cell/components/uv-cell/uv-cell.vue

@@ -107,7 +107,7 @@
 	$uv-cell-color: $uv-main-color !default;
 	$uv-cell-icon-size: 16px !default;
 	$uv-cell-title-font-size: 15px !default;
-	$uv-cell-title-line-height: 22px !default;
+	$uv-cell-title-line-height: 24px !default;
 	$uv-cell-title-color: $uv-main-color !default;
 	$uv-cell-label-font-size: 12px !default;
 	$uv-cell-label-color: $uv-tips-color !default;