Browse Source

feat: vip充值功能

huangziyang 2 weeks ago
parent
commit
50acc7a3c2

+ 62 - 60
components/Container/Container.vue

@@ -1,63 +1,3 @@
-<template>
-  <view class="container">
-    <view
-      class="title"
-      :style="{
-        paddingTop: `${safeArea.top}px`,
-        background: bgColor,
-      }"
-      v-if="showTitle"
-    >
-      <uni-nav-bar
-        :left-icon="showBack ? 'left' : ''"
-        @clickLeft="onBack"
-        :border="false"
-        :title="title"
-        fixed
-        :backgroundColor="bgColor"
-      />
-    </view>
-    <scroll-view
-      :scroll-y="scrollY"
-      :scroll-with-animation="true"
-      :enable-flex="true"
-      :enable-passive="true"
-      :enhanced="true"
-      :paging-enabled="true"
-      :scroll-anchoring="true"
-      :show-scrollbar="false"
-      :scroll-x="scrollX"
-      :scroll-into-view="scrollIntoView"
-      enable-back-to-top
-      scroll-anchoring
-    >
-      <view
-        :class="['scroll-view', scrollX ? 'topic-scroll' : '']"
-        :style="{
-          height: `${safeArea.height}px`,
-          whiteSpace: scrollX ? 'nowrap' : 'normal',
-          ...scrollStyle,
-        }"
-      >
-        <slot></slot>
-      </view>
-      <!-- 底部文字 -->
-      <view v-if="showBottom && bottomText" class="bottom-text">
-        {{ bottomText }}
-      </view>
-    </scroll-view>
-    <view
-      v-if="$slots.footer"
-      class="bottom-button"
-      :style="{
-        width: `${safeArea.width}px`,
-        background: bgColor,
-      }"
-    >
-      <slot name="footer" :footer-height="footerHeight"></slot>
-    </view>
-  </view>
-</template>
 
 <script setup>
 import pages from "@/pages.json";
@@ -180,6 +120,68 @@ defineExpose({
 });
 </script>
 
+<template>
+  <view class="container">
+    <view
+      class="title"
+      :style="{
+        paddingTop: `${safeArea.top}px`,
+        background: bgColor,
+      }"
+      v-if="showTitle"
+    >
+      <uni-nav-bar
+        :left-icon="showBack ? 'left' : ''"
+        @clickLeft="onBack"
+        :border="false"
+        :title="title"
+        fixed
+        :backgroundColor="bgColor"
+      />
+    </view>
+    <scroll-view
+      :scroll-y="scrollY"
+      :scroll-with-animation="true"
+      :enable-flex="true"
+      :enable-passive="true"
+      :enhanced="true"
+      :paging-enabled="true"
+      :scroll-anchoring="true"
+      :show-scrollbar="false"
+      :scroll-x="scrollX"
+      :scroll-into-view="scrollIntoView"
+      enable-back-to-top
+      scroll-anchoring
+    >
+      <view
+        :class="['scroll-view', scrollX ? 'topic-scroll' : '']"
+        :style="{
+          height: `${safeArea.height}px`,
+          whiteSpace: scrollX ? 'nowrap' : 'normal',
+          ...scrollStyle,
+        }"
+      >
+        <slot></slot>
+      </view>
+      <!-- 底部文字 -->
+      <view v-if="showBottom && bottomText" class="bottom-text">
+        {{ bottomText }}
+      </view>
+    </scroll-view>
+    <view
+      v-if="$slots.footer"
+      class="bottom-button"
+      :style="{
+        width: `${safeArea.width}px`,
+        background: bgColor,
+      }"
+    >
+      <slot name="footer" :footer-height="footerHeight" />
+    </view>
+  </view>
+</template>
+
+
 <style lang="scss" scoped>
 @import "@/uni.scss";
 

+ 21 - 0
components/CustomerService/CustomerService.vue

@@ -0,0 +1,21 @@
+<script setup></script>
+<template>
+  <button open-type="contact" session-from class="contact">
+    <slot>联系客服</slot>
+  </button>
+</template>
+
+<style lang="scss" scoped>
+@import "@/uni.scss";
+
+.contact {
+  color: $uni-primary;
+  font-size: 28rpx;
+  background: transparent;
+  padding: 0;
+  margin: 0;
+  &::after {
+    border: 0; // 或者 border: none;
+  }
+}
+</style>

+ 2 - 2
ext.json

@@ -1,11 +1,11 @@
 {
   "extEnable": true,
-  "extAppid": "wx246605ec671bf08d",
+  "extAppid": "wx37802f7af7be337e",
   "directCommit": false,
   "ext": {
     "host_url": "https://openwork.dfwy.tech/",
     "release_host_url": "https://openwork.dfwy.tech/",
-    "app_id": "wx246605ec671bf08d"
+    "app_id": "wx37802f7af7be337e"
   }
 }
 

+ 2 - 2
manifest.json

@@ -1,5 +1,5 @@
 {
-    "name" : "examination",
+    "name" : "开邻做题家",
     "appid" : "__UNI__2C23ED1",
     "description" : "",
     "versionName" : "1.0.0",
@@ -50,7 +50,7 @@
     /* 快应用特有相关 */
     "mp-weixin" : {
         /* 小程序特有相关 */
-        "appid" : "wx246605ec671bf08d",
+        "appid" : "wx37802f7af7be337e",
         "setting" : {
             "urlCheck" : false
         },

+ 7 - 0
pages.json

@@ -35,6 +35,13 @@
         "navigationBarTitleText": "法规"
       }
     },
+    {
+      "path": "pages/recharge/index",
+      "style": {
+        "navigationStyle": "custom",
+        "navigationBarTitleText": "vip充值"
+      }
+    },
     {
       "path": "pages/user/settings",
       "style": {

File diff suppressed because it is too large
+ 4 - 48
pages/challenge/index.vue


+ 3 - 49
pages/learn/index.vue

@@ -1,55 +1,9 @@
 <template>
-  <Topic :topics="list" mode="practice" @answerChange="answerChange"></Topic>
+  <Container title="首页"></Container>
 </template>
 
 <script setup>
-import Topic from "@/components/Topic/Topic.vue";
-const list = {
-  ques: [
-    {
-      id: 1,
-      title: "测试题目测试题目测试题目测试题目测试题目测试题目测试题目测试题目测试题目测试题目测试题目测试题目测试题目测试题目测试题目测试题目测试题目",
-      questions: [
-        { label: "测试1", value: 1 },
-        { label: "测试2", value: 2 },
-        { label: "测试3", value: 3 },
-        { label: "测试4", value: 4 },
-        { label: "测试5", value: 5 },
-      ],
-      anslist: [2],
-    },
-    {
-      id: 2,
-      title: "测试题目",
-      questions: [
-        { label: "测试1", value: 1 },
-        { label: "测试2", value: 2 },
-        { label: "测试3", value: 3 },
-        { label: "测试4", value: 4 },
-        { label: "测试5", value: 5 },
-      ],
-      anslist: [2, 4],
-    },
-
-    {
-      id: 3,
-      title: "测试题目",
-			mode: '综合分析题',
-      questions: [
-        { label: "测试1", value: 1 },
-        { label: "测试2", value: 2 },
-        { label: "测试3", value: 3 },
-        { label: "测试4", value: 4 },
-        { label: "测试5", value: 5 },
-      ],
-      anslist: [2, 3],
-    },
-  ],
-};
-
-const answerChange = (item) => {
-  console.log(item);
-};
+import Container from "@/components/Container/Container.vue";
 </script>
 
-<style></style>
+<style scoped lang="scss"></style>

+ 318 - 0
pages/recharge/index.vue

@@ -0,0 +1,318 @@
+<template>
+  <Container title="VIP充值">
+    <view class="recharge-main">
+      <!-- 内容区 -->
+      <view class="content">
+        <!-- 套餐选择 -->
+        <view class="plan-list">
+          <view class="p"
+            ><view
+              class="plan-card"
+              :class="activeCurrent === 1 && 'active'"
+              @click="activeCurrent = 1"
+            >
+              <view class="plan-title">
+                {{ data[1]?.package_name }}
+                <text class="plan-tag">首月</text>
+              </view>
+              <view class="plan-price">
+                <text class="price">{{
+                  data[1]?.automatic_renewal_first_price
+                }}</text>
+                <view class="plan-origin"
+                  >¥{{ data[1]?.package_original_price }}</view
+                >
+              </view>
+            </view>
+            <view
+              class="plan-tip"
+              :style="{
+                opacity: activeCurrent === 1 ? 1 : 0,
+              }"
+              >每期自动续费{{
+                data[1]?.automatic_renewal_price
+              }}元,可取消</view
+            ></view
+          >
+
+          <view
+            class="plan-card"
+            :class="activeCurrent === 0 && 'active'"
+            @click="activeCurrent = 0"
+          >
+            <view class="plan-title">{{ data[0]?.package_name }}</view>
+            <view class="plan-price">
+              <text class="price">{{
+                data[0]?.package_preferential_price
+              }}</text>
+              <view class="plan-origin"
+                >¥{{ data[0]?.package_original_price }}</view
+              >
+            </view>
+          </view>
+        </view>
+
+        <!-- 权益展示 -->
+        <div class="title">权益展示</div>
+        <view class="benefit" v-show="activeCurrent === 1">
+          <view v-for="item in data[1]?.binding_rights_info" :key="item.id">{{
+            item.authority_title
+          }}</view>
+        </view>
+        <view class="benefit" v-show="activeCurrent === 0">
+          <view v-for="item in data[0]?.binding_rights_info" :key="item.id">{{
+            item.authority_title
+          }}</view>
+        </view>
+      </view>
+      <!-- 底部按钮 -->
+    </view>
+    <template #footer>
+      <!-- 协议勾选 -->
+      <view class="agreement">
+        <uni-data-checkbox
+          v-model="isSelected"
+          multiple
+          :localdata="[
+            {
+              text: '阅读并确认',
+              value: 1,
+            },
+          ]"
+        >
+          <template #label="{ item }">
+            <text
+              :style="{
+                paddingLeft: '10rpx',
+              }"
+              >{{ item.text }}</text
+            >
+            <text>《会员服务权益》</text>
+            <text>(自动续费协议)</text>
+          </template>
+        </uni-data-checkbox>
+      </view>
+      <button class="open-btn" @click="onSubmit">立即开通</button>
+    </template>
+    <!-- 客服 -->
+    <view class="service">
+      <CustomerService>联系客服</CustomerService>
+    </view>
+  </Container>
+</template>
+
+<script setup name="recharge">
+import Container from "@/components/Container/Container.vue";
+import CustomerService from "@/components/CustomerService/CustomerService.vue";
+
+import { ref, onMounted, getCurrentInstance } from "vue";
+import { request } from "../../utils/request";
+import ext from "../../ext.json";
+
+const instance = getCurrentInstance();
+
+const activeCurrent = ref(0);
+const isSelected = ref([0]);
+const data = ref([]);
+
+const onSubmit = () => {
+  // if (!isSelected.value[0])
+  //   return uni.showToast({
+  //     icon: "none",
+  //     title: "请阅读并确认",
+  //   });
+  uni.login({
+    provider: instance.proxy.$mpPlatform.substring(3),
+    success: async ({ code }) => {
+      const package_id = data.value[activeCurrent.value]?.id;
+      // 先调用新增订单再支付
+      // const order = await request('api/question_bank/question_reception/orders/add', {
+      //   package_id
+      // })
+      // console.log(order.data.order_id);
+      const { miniProgram } = uni.getAccountInfoSync();
+
+      const res = await request(
+        "api/question_bank/question_reception/orders/wechat_pay",
+        {
+          code,
+          order_id: 3,
+          // app_id: miniProgram.appId,
+          app_id: ext.extAppid,
+        }
+      );
+      console.log(res);
+    },
+  });
+};
+
+onMounted(async () => {
+  const res = await request(
+    "api/question_bank/question_reception/recharge_package/list"
+  );
+  data.value = res.data.data;
+});
+</script>
+
+<style scoped lang="scss">
+@import "@/uni.scss";
+
+.recharge-main {
+  display: flex;
+  flex-direction: column;
+  background: #fff;
+  position: relative;
+  padding-bottom: 120rpx; // 预留底部按钮高度
+}
+
+.content {
+  flex: 1;
+  padding: 32rpx 24rpx 0 24rpx;
+}
+
+.plan-list {
+  display: flex;
+  gap: 24rpx;
+  margin-bottom: 12rpx;
+}
+
+.title {
+  font-family: PingFang SC, PingFang SC;
+  font-weight: bold;
+  font-size: 32rpx;
+  color: #000000;
+  margin-bottom: 10rpx;
+}
+
+.p {
+  flex: 1;
+}
+
+.plan-card {
+  flex: 1;
+  border: 2rpx solid $default;
+  border-radius: 16rpx;
+  height: 332rpx;
+  background: #fff;
+  transition: border-color 0.2s;
+  position: relative;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  justify-content: center;
+  gap: 52rpx;
+  color: #666666;
+  &.active {
+    color: $uni-primary;
+    border-color: $uni-primary;
+  }
+  .plan-title {
+    font-size: 28rpx;
+    color: #333;
+    margin-bottom: 8rpx;
+    .plan-tag {
+      color: $error;
+      font-size: 20rpx;
+      margin-left: 8rpx;
+      border: 1rpx solid $error;
+      border-radius: 6rpx;
+      padding: 0 8rpx;
+      height: 28rpx;
+      line-height: 28rpx;
+      background: #fff;
+      vertical-align: middle;
+    }
+  }
+  .plan-price {
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+    .price {
+      font-size: 60rpx;
+      font-weight: bold;
+      ::before {
+        content: "¥";
+        font-size: 32rpx;
+      }
+    }
+  }
+  .plan-origin {
+    font-size: 22rpx;
+    text-decoration: line-through;
+    margin-top: 4rpx;
+  }
+}
+
+.plan-tip {
+  font-size: 22rpx;
+  font-weight: bold;
+  margin-bottom: 24rpx;
+  margin-left: 8rpx;
+  margin-top: 15rpx;
+}
+
+.benefit {
+  border: 2rpx solid $default;
+  border-radius: 12rpx;
+  padding: 24rpx;
+  font-weight: bold;
+  view {
+    font-size: 28rpx;
+    color: #333;
+    margin-bottom: 12rpx;
+    &:last-child {
+      margin-bottom: 0;
+    }
+  }
+}
+
+.service {
+  color: $uni-primary;
+  font-size: 28rpx;
+  margin-bottom: 40rpx;
+  text-align: right;
+  position: absolute;
+  bottom: 10%;
+  right: 5%;
+}
+
+.agreement {
+  display: flex;
+  align-items: center;
+  font-size: 22rpx;
+  color: #666;
+  margin-bottom: 32rpx;
+  .radio {
+    margin-right: 12rpx;
+  }
+}
+
+.footer-btn {
+  position: fixed;
+  left: 0;
+  bottom: 0;
+  width: 100vw;
+  background: #fff;
+  padding: 24rpx;
+  box-sizing: border-box;
+  z-index: 10;
+  box-shadow: 0 -2rpx 12rpx rgba(0, 0, 0, 0.03);
+}
+
+.open-btn {
+  width: 100%;
+  background: $uni-primary;
+  color: #fff;
+  font-size: 32rpx;
+  border-radius: 12rpx;
+  height: 88rpx;
+  line-height: 88rpx;
+  text-align: center;
+  font-weight: bold;
+  border: none;
+  margin-top: 0;
+  &:active {
+    background: $uni-primary-disable;
+  }
+}
+</style>

+ 125 - 76
pages/user/index.vue

@@ -1,45 +1,73 @@
 <template>
-  <Container title="我的" :showBack="false">
+  <Container
+    title="我的"
+    :scrollStyle="{
+      padding: 0,
+    }"
+    :showBack="false"
+  >
     <view>
-    <view class="user_box">
-      <view class="box_left">
-        <navigator url="/pages/user/settings">
-          <image class="user_image" :src="userInfo.userpic"></image>
-        </navigator>
-      </view>
-      <view class="box_center">
-        <view class="user_name" v-if="is_login">{{ userInfo.username }}</view>
-        		<navigator class="user_name" url="/pages/login/index" v-if="!is_login">请登录</navigator>
-        <view class="user_info">{{ userInfo.phone }}</view>
+      <view class="user_box">
+        <view class="box_left">
+          <navigator url="/pages/user/settings">
+            <image class="user_image" :src="userInfo.userpic"></image>
+          </navigator>
+        </view>
+        <view class="box_center">
+          <view class="user_name" v-if="is_login">{{ userInfo.username }}</view>
+          <navigator class="user_name" url="/pages/login/index" v-if="!is_login"
+            >请登录</navigator
+          >
+          <view class="user_info">{{ userInfo.phone }}</view>
+        </view>
+        <view class="box_right">
+          <navigator
+            url="/pages/user/settings"
+            class="setting_page"
+            v-if="is_login"
+          >
+            <uni-icons type="gear" size="30"></uni-icons>
+          </navigator>
+        </view>
       </view>
-      <view class="box_right">
-        <navigator url="/pages/user/settings" class="setting_page" v-if="is_login">
-          <uni-icons type="gear" size="30"></uni-icons>
+      <view class="navigator_list">
+        <navigator class="navigator_item" url="/" v-if="false">
+          <view class="navigator_title_vip">VIP展示信息</view>
+        </navigator>
+        <navigator class="navigator_item" url="/pages/recharge/index" v-else>
+          <view class="navigator_title_vip">充值VIP中心banner入口</view>
+        </navigator>
+        <navigator class="navigator_item" url="/pages/orders/index">
+          <view class="navigator_title">订单记录</view>
+          <view class="navigator_title_ico"
+            ><uni-icons type="right" size="20"></uni-icons
+          ></view>
+        </navigator>
+        <navigator class="navigator_item" url="/">
+          <view class="navigator_title">分享有礼</view>
+          <view class="navigator_title_ico"
+            ><uni-icons type="right" size="20"></uni-icons
+          ></view>
+        </navigator>
+        <navigator class="navigator_item" url="/">
+          <view class="navigator_title">邀请有礼</view>
+          <view class="navigator_title_ico"
+            ><uni-icons type="right" size="20"></uni-icons
+          ></view>
         </navigator>
       </view>
+      <view class="packet_content" v-if="show_packet">
+        <view class="close_btn" @click="closePacket"> X </view>
+        <image
+          src="https://kailin-mp.oss-cn-shenzhen.aliyuncs.com/static/icon/red_packet.gif"
+          class="red_packet"
+          @click="_getredpacket"
+        />
+      </view>
     </view>
-    <view class="navigator_list">
-      <navigator class="navigator_item" url="/">
-        <view class="navigator_title_vip">VIP展示信息</view>
-      </navigator>
-	  <navigator class="navigator_item" url="/pages/orders/index">
-	    <view class="navigator_title">订单记录</view>
-		<view class="navigator_title_ico"><uni-icons type="right" size="20"></uni-icons></view>
-	  </navigator>
-	  <navigator class="navigator_item" url="/">
-	    <view class="navigator_title">分享有礼</view>
-		<view class="navigator_title_ico"><uni-icons type="right" size="20"></uni-icons></view>
-	  </navigator>
-	  <navigator class="navigator_item" url="/">
-	    <view class="navigator_title">邀请有礼</view>
-		<view class="navigator_title_ico"><uni-icons type="right" size="20"></uni-icons></view>
-	  </navigator>
-    </view>
-    <view class="packet_content" v-if="show_packet">
-      <view class="close_btn" @click="closePacket"> X </view>
-      <image src="https://kailin-mp.oss-cn-shenzhen.aliyuncs.com/static/icon/red_packet.gif" class="red_packet" @click="_getredpacket" />
+    <view class="service">
+      <view>联系客服</view>
     </view>
-  </view>
   </Container>
 </template>
 
@@ -51,12 +79,13 @@ export default {
     return {
       userInfo: {
         username: "请登录",
-        userpic: "https://kailin-mp.oss-cn-shenzhen.aliyuncs.com/static/icon/doctor.png",
+        userpic:
+          "https://kailin-mp.oss-cn-shenzhen.aliyuncs.com/static/icon/doctor.png",
         phone: "kailin",
         status: 0,
         city_id: 0,
       },
-	  is_login:0,
+      is_login: 0,
       packetList: [],
       show_packet: false,
     };
@@ -76,11 +105,11 @@ export default {
     // #endif
   },
   onShareAppMessage(obj) {
-  // 店铺ID
-  let shopId = uni.getStorageSync("shopId");
+    // 店铺ID
+    let shopId = uni.getStorageSync("shopId");
     //获取当前用户信息
     let userInfo = uni.getStorageSync("userInfo");
-    let param = "?shop_id"+shopId;
+    let param = "?shop_id" + shopId;
     if (userInfo.uid) {
       param = "&share_uid=" + userInfo.uid;
     }
@@ -97,8 +126,12 @@ export default {
     for (let i in shareList) {
       if (shareList[i].pages == "pages/user/index") {
         shareObj.path = shareList[i].path ? shareList[i].path : shareObj.path;
-        shareObj.title = shareList[i].title ? `999智控终端平台\n${shareList[i].title}` : shareObj.title;
-        shareObj.imageUrl = shareList[i].image_url ? shareList[i].image_url : shareObj.imageUrl;
+        shareObj.title = shareList[i].title
+          ? `999智控终端平台\n${shareList[i].title}`
+          : shareObj.title;
+        shareObj.imageUrl = shareList[i].image_url
+          ? shareList[i].image_url
+          : shareObj.imageUrl;
       }
     }
     if (param) {
@@ -109,32 +142,34 @@ export default {
   },
   onShow() {
     // 登录提示
-    this.is_login = this.$checkAccess.checkLogin()
+    this.is_login = this.$checkAccess.checkLogin();
     // 未登录不请求
-    if ( !this.is_login ) {
-    	this.userInfo = {
-    		username: '请登录',
-    		userpic: 'https://kailin-mp.oss-cn-shenzhen.aliyuncs.com/static/icon/doctor.png',
-    		phone: 'kailin',
-    		status: 0,
-    		city_id: 0,
-    		is_video_vip:0,
-    		amount:0.00,
-    		transfer_amount:0.00
-    	};
-    	return;
+    if (!this.is_login) {
+      this.userInfo = {
+        username: "请登录",
+        userpic:
+          "https://kailin-mp.oss-cn-shenzhen.aliyuncs.com/static/icon/doctor.png",
+        phone: "kailin",
+        status: 0,
+        city_id: 0,
+        is_video_vip: 0,
+        amount: 0.0,
+        transfer_amount: 0.0,
+      };
+      return;
     }
     // 判断数据
     this.$http.request("api/custom/get_info").then((callback) => {
       if (callback.code == "success") {
-        if (!callback.data.userpic) callback.data.userpic = "https://kailin-mp.oss-cn-shenzhen.aliyuncs.com/static/icon/doctor.png";
+        if (!callback.data.userpic)
+          callback.data.userpic =
+            "https://kailin-mp.oss-cn-shenzhen.aliyuncs.com/static/icon/doctor.png";
         // 赋值
         this.userInfo = callback.data;
         // 存储登录标识
         uni.setStorageSync("userInfo", callback.data);
       }
     });
-    this._getPacketNum();
   },
   methods: {
     _getredpacket() {
@@ -170,11 +205,15 @@ export default {
     closePacket() {
       this.show_packet = false;
     },
+    onChange(e) {
+      console.log(e);
+    },
   },
 };
 </script>
 
-<style lang="less">
+<style lang="scss" scoped>
+@import "@/uni.scss"; // 引入全局scss变量
 .user_box {
   width: 680rpx;
   height: 180rpx;
@@ -241,29 +280,29 @@ export default {
   background: #ffffff;
   border-top: 1rpx solid #eeeeee;
   .navigator_item {
-	  position: relative;
-	.navigator_title_ico{
-		position: absolute;
-		right: 30rpx;
-		top: 17rpx;
-	}
+    position: relative;
+    .navigator_title_ico {
+      position: absolute;
+      right: 30rpx;
+      top: 17rpx;
+    }
     .navigator_title {
-	  width: 100%;
+      width: 100%;
       display: block;
       font-size: 30rpx;
       line-height: 40rpx;
-	  padding: 20rpx 30rpx;
-	  border-bottom: 1rpx solid #eeeeee;
+      padding: 20rpx 30rpx;
+      border-bottom: 1rpx solid #eeeeee;
+    }
+    .navigator_title_vip {
+      width: 100%;
+      display: block;
+      font-size: 30rpx;
+      line-height: 40rpx;
+      padding: 30rpx 60rpx;
+      border-bottom: 1rpx solid #eeeeee;
+      font-size: 30rpx;
     }
-	.navigator_title_vip{
-		width: 100%;
-		display: block;
-		font-size: 30rpx;
-		line-height: 40rpx;
-		padding: 30rpx 60rpx;
-		border-bottom: 1rpx solid #eeeeee;
-		font-size: 30rpx;
-	}
   }
 }
 
@@ -339,4 +378,14 @@ export default {
     left: 0;
   }
 }
+
+.service {
+  position: absolute;
+  bottom: 20%;
+  right: 5%;
+  color: $uni-primary;
+  font-size: 28rpx;
+  margin-bottom: 40rpx;
+  text-align: right;
+}
 </style>

+ 3 - 1
uni_modules/uni-data-checkbox/components/uni-data-checkbox/uni-data-checkbox.vue

@@ -20,7 +20,9 @@
 						<view class="checkbox__inner-icon"></view>
 					</view>
 					<view class="checklist-content" :class="{'list-content':mode === 'list' && icon ==='left'}">
-						<text class="checklist-text" :style="item.styleIconText">{{item[map.text]}}</text>
+						<slot name="label" :item="item">
+							<text class="checklist-text" :style="item.styleIconText">{{item[map.text]}}</text>
+						</slot>
 						<view v-if="mode === 'list' && icon === 'right'" class="checkobx__list" :style="item.styleBackgroud"></view>
 					</view>
 				</label>

+ 1 - 0
utils/index.js

@@ -1,3 +1,4 @@
+import { getCurrentInstance } from "vue";
 // 获取元素宽高
 export const getRect = ({ name, onSuccess, instance, multiple }) => {
   // 创建一个选择器查询对象

+ 3 - 2
utils/request.js

@@ -5,12 +5,12 @@ var domain = 'https://openwork.dfwy.tech/'
 // #ifdef MP-WEIXIN
 // 'http://127.0.0.1:8000/';
 // domain = uni.getAccountInfoSync().miniProgram.envVersion == 'release' ? 'https://openwork.dfwy.tech/' : 'https://openwork.dfwy.tech/';
-domain = uni.getAccountInfoSync().miniProgram.envVersion == 'release' ? ext.getExtStoreId('release_host_url') : ext.getExtStoreId('host_url');
+// domain = uni.getAccountInfoSync().miniProgram.envVersion == 'release' ? ext.getExtStoreId('release_host_url') : ext.getExtStoreId('host_url');
 var app_id = ext.getExtStoreId('app_id') ? ext.getExtStoreId('app_id') : '';
 // #endif
 
 // 发送网络请求的函数
-const request = (url, data = {}, method = 'GET') => {
+export const request = (url, data = {}, method = 'GET') => {
 	// 获取登录标识
 	let userLogin = uni.getStorageSync('userLogin');
 	let shopId 	  = uni.getStorageSync("shopId");
@@ -108,6 +108,7 @@ const strToParam = (str, separator = '&')=> {
 	return result;
 }
 
+
 // 模块导出,{name:object} 为对象式,导出多个使用
 // export default {request:request,request1:request1};
 // 单个对象,直接导出如下

Some files were not shown because too many files changed in this diff