kevin.T 2 ヶ月 前
コミット
b67642f0a5

+ 1 - 0
packages/merchant/src/core/libs/agent-requests.ts

@@ -48,6 +48,7 @@ export const getUserInfoById = (id: string | number) =>
       groupName: string
       experience: number
       retryStatus?: number
+      focus?: string
     }>
   >('/app-api/member/user/getByUserId', { id })
 /**

+ 8 - 5
packages/merchant/src/manifest.json

@@ -37,10 +37,7 @@
         ],
         "minSdkVersion": 30,
         "targetSdkVersion": 30,
-        "abiFilters": [
-          "armeabi-v7a",
-          "arm64-v8a"
-        ]
+        "abiFilters": ["armeabi-v7a", "arm64-v8a"]
       },
       "ios": {},
       "sdkConfigs": {},
@@ -87,6 +84,12 @@
     "setting": {
       "urlCheck": false
     },
+    "requiredPrivateInfos": ["getLocation", "chooseAddress", "chooseLocation"],
+    "permission": {
+      "scope.userLocation": {
+        "desc": "你的位置信息将用于小程序位置接口的效果展示"
+      }
+    },
     "usingComponents": true
   },
   "mp-alipay": {
@@ -108,4 +111,4 @@
       "base": "/"
     }
   }
-}
+}

+ 9 - 1
packages/merchant/src/pages.json

@@ -69,7 +69,7 @@
       }
     },
     {
-      "path": "pages/login/forget",
+      "path": "pages/login/forgetPassword",
       "type": "page",
       "style": {
         "navigationBarTitleText": "修改密码",
@@ -167,6 +167,14 @@
       }
     },
     {
+      "path": "pages/home/result/success",
+      "type": "page",
+      "style": {
+        "navigationBarTitleText": "核销结果",
+        "navigationBarBackgroundColor": "#fff"
+      }
+    },
+    {
       "path": "pages/mine/merchant/merchant_settings",
       "type": "page",
       "style": {

+ 30 - 4
packages/merchant/src/pages/agent/designer/archives/index.vue

@@ -19,6 +19,7 @@ import {
   getDesignerFamilyInfo,
   getSalesOrdersCounts,
   saveDesignerFamilyInfo,
+  getUserInfoById,
 } from '../../../../core/libs/agent-requests'
 import { messages } from '../../../../core/libs/messages'
 import { omit } from 'radash'
@@ -48,16 +49,25 @@ const tabs = [
 const id = ref()
 const { data: basicData, run: setBasicData } = useRequest(() => getDesignerBasicInfo(id.value))
 console.log('basicData::::', basicData)
+const { data: familyData, run: setData } = useRequest(() => getUserInfoById(id.value))
 const query = computed(() => ({ userId: id.value }))
 const eventsQuery = computed(() => ({ type: '3' }))
 const actionSheetStatus = ref(false)
 const schema = ref<DataFormSchema>()
-const formData = ref({})
+const formData = ref({
+  focus: '',
+})
+const formDataFoucs = ref<{
+  focus: string
+}>({
+  focus: '',
+})
 const submitType = ref<'family' | 'award'>()
 const familyPageRef = ref<ComponentExposed<typeof PageHelperEvo>>()
 const awardsListRef = ref<ComponentExposed<typeof ListHelperEvo>>()
 const saleListRef = ref<ComponentExposed<typeof ListHelperEvo>>()
 const activityListRef = ref<ComponentExposed<typeof ListHelperEvo>>()
+const getFormDataFoucs = computed(() => familyData.value?.focus)
 // const {} = useRequest()
 const handleEditBasicInfo = async () => {
   await uni.navigateTo({ url: `/pages/agent/designer/archives/basic-info/index?id=${id.value}` })
@@ -204,14 +214,17 @@ const handleDeleteFamilyInfo = async (item: DesignerFamilyInfo) => {
   familyPageRef.value?.reload()
 }
 const handleSubmitFocus = async () => {
-  await requestToast(() => createFocus({ ...formData.value, userId: id.value }), {
+  await requestToast(() => createFocus({ ...formDataFoucs.value, userId: id.value }), {
     success: true,
     successTitle: '保存成功',
   })
-  formData.value = {}
+  await setData()
+  formDataFoucs.value.focus = familyData.value?.focus as any
 }
 onLoad(async (query?: Record<string | 'id', any>) => {
   id.value = query?.id
+  await setData()
+  formDataFoucs.value.focus = familyData.value?.focus as any
 })
 onShow(async () => {
   switch (tab.value) {
@@ -270,6 +283,19 @@ onShow(async () => {
                   }"
                 ></DataRender>
               </template>
+              <template v-else-if="key === 'retryStatus'">
+                <DataRender
+                  v-bind="{
+                    type: 'Select',
+                    value: value,
+                    options: [
+                      { label: '弱绑定', value: 0 },
+                      { label: '强绑定', value: 1 },
+                      { label: '公开', value: 3 },
+                    ],
+                  }"
+                ></DataRender>
+              </template>
               <template v-else>
                 <DataRender v-bind="{ type: 'Original', value: value }"></DataRender>
               </template>
@@ -470,7 +496,7 @@ onShow(async () => {
             </template>
           </SectionHeading>
           <DataForm
-            v-model="formData"
+            v-model="formDataFoucs"
             :schema="{ focus: { type: 'Textarea', hiddenLabel: true } }"
           ></DataForm>
         </div>

+ 1 - 0
packages/merchant/src/pages/agent/designer/detail.vue

@@ -45,6 +45,7 @@ const memberLevelsStore = useMemberLevelsStore()
 const { getMemberLevelLogo } = memberLevelsStore
 const id = ref()
 const { data, run: setData } = useRequest(() => getUserInfoById(id.value))
+console.log('getUserInfoById', data)
 const active = ref('integral')
 const tabs = ref([
   { label: '数据动态', value: 'integral' },

+ 2 - 2
packages/merchant/src/pages/agent/report-infos/index.vue

@@ -56,7 +56,7 @@ onShow(async () => {
                 >
                   报备时间:
                   <!-- 2024-02-21 10:12 -->
-                  {{ dayjs(it.createTime).format('YYYY-MM-DD HH:mm') }}
+                  {{ dayjs(it.createTime).format('YYYY-MM-DD HH:mm:ss') }}
                 </div>
                 <div
                   class="right-0 top-[15px] text-center text-sm font-normal font-['PingFang_SC'] leading-normal"
@@ -73,7 +73,7 @@ onShow(async () => {
                   v-for="(item, index) in [
                     { label: '店面名称', value: it.shopName },
                     {
-                      value: dayjs(it.arrivalTime).format('YYYY-MM-DD hh:mm:ss'),
+                      value: dayjs(it.arrivalTime).format('YYYY-MM-DD HH:mm:ss'),
                       label: '到店时间',
                     },
                     { value: it.receptionist, label: '接待人员' },

+ 28 - 32
packages/merchant/src/pages/home/index.vue

@@ -40,7 +40,7 @@ const { isLogined, userInfo, isAgent, isMerchant } = storeToRefs(userStore)
 const orderAmount = ref()
 const todoPageHelperRef = ref<ComponentExposed<typeof PageHelperEvo>>()
 const pointsAmount = computed(() => orderAmount.value * 10)
-const dynamicsList = ref<{ content: string, createTime: number }[]>([]);
+const dynamicsList = ref<{ content: string; createTime: number }[]>([])
 const todosQuery = computed(() => ({
   brokerId: String(userInfo.value.userId),
   executionTime: [
@@ -67,10 +67,10 @@ const handleScanning = async () => {
     uni.showToast({ title: '不支持此二维码/条码', icon: 'none', duration: 5000 })
     return
   }
-  await requestToast(() => scanCodeCheckPaper({ orderNo: options.no }), {
-    success: true,
-    successTitle: '验券成功',
-  })
+  const { data } = await requestToast(() => scanCodeCheckPaper({ orderNo: options.no }))
+  if (data) {
+    uni.navigateTo({ url: '/pages/home/result/success' })
+  }
 }
 const handle2Settlement = () => {
   if ((orderAmount.value ?? '') === '') {
@@ -84,17 +84,17 @@ const handle2Settlement = () => {
 const toAddReporting = () => {
   uni.navigateTo({ url: '/pages/home/merchant/add-reporting-information' })
 }
-const getDynamicsList  = async () =>{
-  await getDesignerPointsActivities({brokerId:String(userInfo.value.userId)}).then(x =>{
+const getDynamicsList = async () => {
+  await getDesignerPointsActivities({ brokerId: String(userInfo.value.userId) }).then((x) => {
     dynamicsList.value = x.data.list
-  });
-console.log(dynamicsList.value,"dynamicsList.value")
+  })
+  console.log(dynamicsList.value, 'dynamicsList.value')
 }
 onShow(async () => {
   if (isAgent.value) {
     await Promise.all([setTasks(), todoPageHelperRef.value?.refresh()])
   }
-  getDynamicsList();
+  getDynamicsList()
 })
 onLoad(() => {
   console.log(isLogined.value)
@@ -267,29 +267,25 @@ onShareAppMessage(() => ({}))
         </div>
         <div>
           <SectionHeading title="设计师最新动态" path="" custom-class="mb-5"></SectionHeading>
-<!--          <PageHelperEvo-->
-<!--            :request="getDesignerPointsActivities"-->
-<!--            :query="designerPointsActivitiesQuery"-->
-<!--          >-->
-<!--            <template>-->
-              <div class="flex flex-col gap-4" v-for="(it, i) in  dynamicsList" :key="i">
-<!--                <template >-->
-                  <Card class="mb-4">
-                    <div
-                      class="text-black/90 text-sm font-normal font-['PingFang_SC'] leading-none"
-                    >
-                      {{ it.content }}
-                    </div>
-                    <div
-                      class="mt-3 text-black/30 text-xs font-normal font-['PingFang_SC'] leading-none"
-                    >
-                      {{ dayjs(it.createTime).format('YYYY-MM-DD HH:mm') }}
-                    </div>
-                  </Card>
-<!--                </template>-->
+          <!--          <PageHelperEvo-->
+          <!--            :request="getDesignerPointsActivities"-->
+          <!--            :query="designerPointsActivitiesQuery"-->
+          <!--          >-->
+          <!--            <template>-->
+          <div class="flex flex-col gap-4" v-for="(it, i) in dynamicsList" :key="i">
+            <!--                <template >-->
+            <Card class="mb-4">
+              <div class="text-black/90 text-sm font-normal font-['PingFang_SC'] leading-none">
+                {{ it.content }}
               </div>
-<!--            </template>-->
-<!--          </PageHelperEvo>-->
+              <div class="mt-3 text-black/30 text-xs font-normal font-['PingFang_SC'] leading-none">
+                {{ dayjs(it.createTime).format('YYYY-MM-DD HH:mm') }}
+              </div>
+            </Card>
+            <!--                </template>-->
+          </div>
+          <!--            </template>-->
+          <!--          </PageHelperEvo>-->
         </div>
       </div>
     </template>

+ 37 - 0
packages/merchant/src/pages/home/result/success.vue

@@ -0,0 +1,37 @@
+<route lang="yaml">
+style:
+  navigationBarTitleText: 核销结果
+  navigationBarBackgroundColor: '#fff'
+</route>
+<script lang="ts" setup>
+const navigateBack = () => {
+  uni.navigateBack({
+    delta: 1,
+  })
+}
+</script>
+
+<template>
+  <view class="bg-white p-[16px] flex-grow flex flex-col">
+    <div class="flex-1 items-center">
+      <div
+        class="w-[68px] h-[68px] rounded-full mt-[34px] flex m-[auto] mt-[30%] items-center justify-center"
+        style="border: 2px solid #2357e9"
+      >
+        <wd-icon name="check-bold" color="#2357e9" size="42px"></wd-icon>
+      </div>
+      <div class="m-[auto] pt-[20px] text-black/90 center fw-600">核销成功</div>
+    </div>
+    <div class="w-full mt-[50px] pb-[20px]">
+      <wd-button block :round="false" @click="navigateBack">
+        <div
+          class="text-center text-white text-base font-normal font-['PingFang_SC'] leading-normal"
+        >
+          继续扫码验券
+        </div>
+      </wd-button>
+    </div>
+  </view>
+</template>
+
+<style lang="scss" scoped></style>

+ 0 - 0
packages/merchant/src/pages/login/forget.vue → packages/merchant/src/pages/login/forgetPassword.vue


+ 2 - 1
packages/merchant/src/types/uni-pages.d.ts

@@ -6,7 +6,7 @@
 interface NavigateToOptions {
   url: "/pages/login/index" |
        "/pages/home/index" |
-       "/pages/login/forget" |
+       "/pages/login/forgetPassword" |
        "/pages/mine/index" |
        "/pages/agent/designer/detail" |
        "/pages/agent/designer/index" |
@@ -18,6 +18,7 @@ interface NavigateToOptions {
        "/pages/home/merchant/add-reporting-information" |
        "/pages/home/merchant/mine" |
        "/pages/home/merchant/settlement" |
+       "/pages/home/result/success" |
        "/pages/mine/merchant/merchant_settings" |
        "/pages/agent/designer/archives/index" |
        "/pages/agent/designer/points/index" |