qianxinyu 3 months ago
parent
commit
cbdb374e68

+ 25 - 4
components/FollowPopup/FollowPopup.vue

@@ -2,13 +2,18 @@
   <view class="add_follow">
     <view class="close_area"><button class="close_btn" @click="closePopup">关闭</button></view>
     <view class="info_alter">
-      <text v-show="follow_linkurl">点击二维码添加客服</text>
-      <text v-show="!follow_linkurl">长按二维码添加客服</text>
+      <text v-show="follow_linkurl">{{ clickTitle }}</text>
+      <text v-show="!follow_linkurl">{{ longTapTitle }}</text>
     </view>
-    <view class="qr_code_area" @click="followLinkurl">
+    <view v-if="!picUrl" class="qr_code_area" @click="followLinkurl">
       <image :src="followQrcode" class="qr_code" mode="" show-menu-by-longpress> </image>
     </view>
-    <view class="rule_info">
+    <view v-if="picUrl">
+      <view class="qr_code_area" @click="followLinkurl">
+        <image :src="picUrl" class="qr_code" mode="" show-menu-by-longpress> </image>
+      </view>
+    </view>
+    <view class="rule_info" v-if="showRule">
       <view class="">报单规则:</view>
       <view class="">1、预约报单需要添加客服人员</view>
       <view class="">2、添加完客服人员后填写小程序当前登录手机号以绑定账号</view>
@@ -25,6 +30,22 @@ export default {
       type: Function,
       required: true,
     },
+    showRule: {
+      type: Boolean,
+      default: true,
+    },
+    clickTitle: {
+      type: String,
+      default: "点击二维码添加客服",
+    },
+    longTapTitle: {
+      type: String,
+      default: "长按二维码添加客服",
+    },
+    picUrl: {
+      type: String,
+      default: "",
+    },
   },
   data() {
     return {

+ 1 - 1
pages.json

@@ -211,7 +211,7 @@
     {
       "path": "pages/activity/index",
       "style": {
-        "navigationBarTitleText": "猜灯谜"
+        "navigationBarTitleText": "答题活动"
       }
     },
     {

+ 46 - 12
pages/activity/index.vue

@@ -54,7 +54,7 @@
 
     <!-- 结果页面 -->
     <view class="page-3" v-if="pageIndex == 3">
-      <view class="no-join-number" v-if="acticve_detail.join_last == 0 && acticve_detail.share_last == 0 && isFromIndex">
+      <view class="no-join-number" v-if="acticve_detail.join_last <= 0 && acticve_detail.share_last == 0 && isFromIndex">
         <view class="header">
           <text>您的答题次数已用完!</text>
           <text>谢谢参与</text>
@@ -65,6 +65,13 @@
         </view>
       </view>
 
+      <view style="width: 100%" v-else-if="acticve_detail.join_last <= 0 && acticve_detail.share_last !== 0 && isFromIndex">
+        <view class="result-fail result-content">
+          <view class="result-text" style="color: #fff">您的答题次数已用完!</view>
+          <button open-type="share" class="result-btn">分享好友再来一次</button>
+        </view>
+      </view>
+
       <view v-else style="width: 100%">
         <!-- 结果展示 -->
         <view class="result-success result-content" v-if="is_answer">
@@ -84,7 +91,7 @@
 
     <!-- 抽奖入口 -->
     <view class="lottery-entrance" v-if="showLottery && pageIndex !== 1">
-      <view class="close-btn" @click="_handleCloseLottery">x</view>
+      <!-- <view class="close-btn" @click="_handleCloseLottery">x</view> -->
       <image @click="_goLottery" src="https://kailin-mp.oss-cn-shenzhen.aliyuncs.com/static/lottery/20250207-174439.gif" alt="" />
     </view>
   </view>
@@ -123,6 +130,8 @@ const isFromIndex = ref(false);
 
 const lotteryRule = ref();
 
+const shareObj = ref(null);
+
 onLoad((options) => {
   //未登陆提醒用户登陆
   if (!$checkAccess.checkLogin()) {
@@ -162,6 +171,15 @@ onShow(() => {
   if (detialId.value) {
     _getDeatail(detialId.value);
   }
+
+  if ($checkAccess.checkLogin()) {
+    http.request("api/custom/get_info").then((callback) => {
+      if (callback.code == "success") {
+        // 存储登录标识
+        uni.setStorageSync("userInfo", callback.data);
+      }
+    });
+  }
 });
 
 // 定义页面的分享逻辑
@@ -170,9 +188,19 @@ onShareAppMessage((res) => {
     _addShare();
   }
   return {
-    title: "正月十五猜灯谜",
+    title: acticve_detail.value.name, //"999智控终端平台\n正月十五猜灯谜",
     path: `/pages/activity/index?id=${detialId.value}`,
-    imageUrl: "https://kailin-mp.oss-cn-shenzhen.aliyuncs.com/static/lottery/20250210-143021.jpg",
+    imageUrl: acticve_detail.value.logo,
+    promise: new Promise((resolve, reject) => {
+      http.request("api/share_message/get_item", { item_id: detialId.value, pages: "/pages/activity/index" }).then((callback) => {
+        console.log(callback, "api/share_message/get_item");
+        resolve({
+          title: callback.data?.title == "" ? acticve_detail.value.name : callback.data.title,
+          path: `/pages/activity/index?id=${detialId.value}`,
+          imageUrl: callback.data?.image_url == "" ? acticve_detail.value.logo : callback.data.image_url,
+        });
+      });
+    }),
   };
 });
 
@@ -185,6 +213,9 @@ const _getDeatail = (id) => {
   http.request("api/riddle_active/get_detail", { id }).then((response) => {
     console.log(response);
     if (response.code == "success") {
+      uni.setNavigationBarTitle({
+        title: response.data.name,
+      });
       acticve_detail.value = response.data;
       if (response.data.join_last > 0) {
         _getQuestion();
@@ -237,6 +268,11 @@ const _handleSubmitAnswer = () => {
       pageIndex.value = 3;
       //   _getDeatail(detialId.value);
       is_answer.value = response.data.is_answer;
+    } else {
+      uni.showToast({
+        title: response.msg,
+        icon: "none",
+      });
     }
   });
 };
@@ -276,7 +312,7 @@ const _handleChangePage = (index) => {
     answer_id.value = null;
   } else {
     pageIndex.value = 3;
-    if (acticve_detail.value.join_last == 0 && acticve_detail.value.share_last == 0) {
+    if (acticve_detail.value.join_last == 0 || acticve_detail.value.share_last == 0) {
       isFromIndex.value = true;
     }
   }
@@ -291,11 +327,10 @@ const _handleChangeRule = (type) => {
 <style lang="less" scoped>
 .activity {
   padding: 0 16rpx 120rpx;
-  height: 100vh;
   box-sizing: border-box;
-  overflow: hidden;
   position: relative;
   width: 100vw;
+  min-height: 100vh;
   .header {
     .logo {
       width: 100%;
@@ -367,6 +402,8 @@ const _handleChangeRule = (type) => {
         margin-bottom: 40rpx;
         background-color: #ffffff;
         opacity: 0.8;
+        height: 400rpx;
+        overflow-y: auto;
         .rich_text {
           white-space: break-spaces;
         }
@@ -385,7 +422,6 @@ const _handleChangeRule = (type) => {
   }
 
   .page-2 {
-    height: 100%;
     display: flex;
     flex-direction: column;
     z-index: 10;
@@ -395,8 +431,7 @@ const _handleChangeRule = (type) => {
     align-items: center;
     justify-content: center;
     box-sizing: border-box;
-    padding: 0 16rpx;
-    margin-top: -200rpx;
+    padding: 80rpx 16rpx 0;
     .question {
       // 题干的样式
       background-color: #fff;
@@ -408,7 +443,6 @@ const _handleChangeRule = (type) => {
       width: 100%;
       box-sizing: border-box;
       overflow: auto;
-      margin-top: -75rpx;
     }
     .options {
       // 选项的样式
@@ -512,7 +546,7 @@ const _handleChangeRule = (type) => {
     opacity: 0.95;
     box-sizing: border-box;
     padding: 0 16rpx;
-    margin-top: -250rpx;
+    padding-top: 250rpx;
     .result-content {
       width: 100%;
       .result-text {

+ 34 - 3
pages/activity/lottery.vue

@@ -1,6 +1,6 @@
 <template>
   <view>
-    <view class="lottery_box" :style="height">
+    <view class="lottery_box">
       <view class="lottery_time" v-if="lotteryInfo.id">活动时间:{{ lotteryInfo.start_date }} ~ {{ lotteryInfo.end_date }}</view>
       <view class="lottery_info">
         <image class="lottery_logo" v-if="lotteryInfo.logo" :src="lotteryInfo.logo" mode="widthFix"></image>
@@ -79,11 +79,24 @@
         <navigator url="/pages/addr/index?notify=addr&type=create" class="create_addr">新建收货地址</navigator>
       </view>
     </uni-popup>
+    <uni-popup ref="addFollow" type="center" class="center_popup">
+      <FollowPopup
+        :picUrl="'https://kailin-mp.oss-cn-shenzhen.aliyuncs.com/static/qrcode/qrcode.jpg'"
+        :closePopup="closePopup"
+        :showRule="false"
+        :clickTitle="'点击二维码添加客服抽奖'"
+        :longTapTitle="'长按二维码添加客服抽奖'"
+      />
+    </uni-popup>
   </view>
 </template>
 
 <script>
+import FollowPopup from "@/components/FollowPopup/FollowPopup.vue";
 export default {
+  components: {
+    FollowPopup,
+  },
   data() {
     return {
       height: "",
@@ -146,9 +159,20 @@ export default {
       this.shareRequest();
     }
     return {
-      title: "正月十五猜灯谜",
+      title: "999智控终端平台\n正月十五猜灯谜",
       path: "/pages/activity/index?id=" + this.requestParam.activity_id,
       imageUrl: "https://kailin-mp.oss-cn-shenzhen.aliyuncs.com/static/lottery/20250210-143021.jpg",
+      promise: new Promise((resolve, reject) => {
+        this.$http.request("api/share_message/get_item", { item_id: this.requestParam.activity_id, pages: "/pages/activity/index" }).then((callback) => {
+          console.log(callback, "api/share_message/get_item");
+          let obj = {
+            title: callback.data?.title == "" ? this.lotteryInfo.name : callback.data.title,
+            path: "/pages/activity/index?id=" + this.requestParam.activity_id,
+            imageUrl: callback.data?.image_url == "" ? this.lotteryInfo.logo : callback.data.image_url,
+          };
+          resolve(obj);
+        });
+      }),
     };
   },
   onShow() {
@@ -251,6 +275,10 @@ export default {
         });
         return;
       }
+      if (!this.$checkAccess.getHasFollow()) {
+        this.$refs.addFollow.open("center");
+        return;
+      }
       // 次数操作
       this.lotteryInfo.number = this.lotteryInfo.number - 1;
       // 请求列表
@@ -272,6 +300,9 @@ export default {
         }
       });
     },
+    closePopup() {
+      this.$refs.addFollow.close();
+    },
     showRule() {
       this.$refs.lotteryRule.open("center");
     },
@@ -345,10 +376,10 @@ export default {
 .lottery_box {
   display: block;
   width: 750rpx;
-  height: 1100rpx;
   margin: 0 auto;
   position: relative;
   background: linear-gradient(to bottom, #fc335f 0%, #fb7224 80%, #ffffff 100%);
+  padding-bottom: 200rpx;
   .share-btn {
     width: 80%;
     height: 80rpx;

+ 2 - 2
pages/car/index.vue

@@ -114,7 +114,7 @@ export default {
     let shareList = getApp().globalData.shareList;
     // 获取分享信息
     let shareObj = {
-      title: "药优惠 得积分 兑豪礼",
+      title: "999智控终端平台\n药优惠 得积分 兑豪礼",
       path: "/pages/index/index",
       imageUrl: "",
     };
@@ -122,7 +122,7 @@ export default {
     for (let i in shareList) {
       if (shareList[i].pages == "pages/car/index") {
         shareObj.path = shareList[i].path ? shareList[i].path : shareObj.path;
-        shareObj.title = shareList[i].title ? shareList[i].title : shareObj.title;
+        shareObj.title = shareList[i].title ? `999智控终端平台\n${shareList[i].title}` : shareObj.title;
         shareObj.imageUrl = shareList[i].image_url ? shareList[i].image_url : shareObj.imageUrl;
       }
     }

+ 442 - 425
pages/coupon/active.vue

@@ -1,433 +1,450 @@
 <template>
-	<view>
-		<view class="banner_box">
-			<image class="banner_img" :src="activeInfo.banner_img" ></image>
-		</view>
-		<view class="active_info">
-			<view class="active_name">{{activeInfo.name}}</view>
-			<view class="active_time">活动时间:{{activeInfo.start_date}} ~ {{activeInfo.end_date}}</view>
-			<view class="active_citys" v-if="activeInfo.city_ids">活动范围:{{activeInfo.city_ids}}</view>
-		</view>
-		<view class="active_coupon">
-			<view class="active_subtitle">优惠券</view>
-			<view class="coupon_list">
-				<view class="coupon_item" v-for="(item,index) in activeInfo.coupon_list" :key="index">
-					<view class="left_box">
-						<view class="rebate" v-if="item.rebate_type == 1" > ¥{{item.rebate}}</view>
-						<view class="rebate" v-if="item.rebate_type == 2" > 打 {{item.rebate}} 折</view>
-						<view class="rebate" v-if="item.rebate_type == 3" > 赠 <text v-if="item.rebate_scope.length">{{item.rebate_scope[0].product_name}}</text> </view>
-						<view class="std_pay">满 ¥{{item.std_pay}} 可用</view>
-						<view class="coupon_exp">有效期:{{item.exp_time}}</view>
-					</view>
-					<view class="right_box">
-						<button class="get_btn" v-if="item.is_have == 0" @click="getCoupon(index)">立即领取</button>
-						<button class="get_btn" v-if="item.is_have == 1"  @click="toUse(item)">去使用</button>
-					</view>
-				</view>
-			</view>
-		</view>
-		<view class="active_product" v-if="activeInfo.product_list.length" >
-			<view class="active_subtitle">活动商品</view>
-			<view class="product_list" :class="show_more_product?'more':''">
-				<view class="product_item" v-for="(item,index) in activeInfo.product_list" :key="index" >
-					<image class="product_image" :src="item.thumb" mode=""></image>
-					<view class="product_name"><text>{{item.product_name}}</text></view>
-					<view class="stock_price">
-						<view class="product_price" >
-							<text >¥ {{item.price}} </text>
-						</view>
-						<view class="product_stock">剩{{item.stock}}个</view>
-					</view>
-				</view>
-			</view>
-			<view class="more_product" v-if="!show_more_product"  @click.stop="show_more_product = true">
-				<uni-icons type="down" size="20" ></uni-icons>
-			</view>
-		</view>
-		<view class="active_rule" v-if="activeInfo.active_rule">
-			<view class="active_subtitle">活动规则</view>
-			<view class="active_rule_info">
-				<rich-text class="rich_text" :nodes="activeInfo.active_rule"></rich-text>
-			</view>
-		</view>
-		<view class="" style="height: 10rpx;"></view>
-	</view>
+  <view>
+    <view class="banner_box">
+      <image class="banner_img" :src="activeInfo.banner_img"></image>
+    </view>
+    <view class="active_info">
+      <view class="active_name">{{ activeInfo.name }}</view>
+      <view class="active_time">活动时间:{{ activeInfo.start_date }} ~ {{ activeInfo.end_date }}</view>
+      <view class="active_citys" v-if="activeInfo.city_ids">活动范围:{{ activeInfo.city_ids }}</view>
+    </view>
+    <view class="active_coupon">
+      <view class="active_subtitle">优惠券</view>
+      <view class="coupon_list">
+        <view class="coupon_item" v-for="(item, index) in activeInfo.coupon_list" :key="index">
+          <view class="left_box">
+            <view class="rebate" v-if="item.rebate_type == 1"> ¥{{ item.rebate }}</view>
+            <view class="rebate" v-if="item.rebate_type == 2"> 打 {{ item.rebate }} 折</view>
+            <view class="rebate" v-if="item.rebate_type == 3">
+              赠 <text v-if="item.rebate_scope.length">{{ item.rebate_scope[0].product_name }}</text>
+            </view>
+            <view class="std_pay">满 ¥{{ item.std_pay }} 可用</view>
+            <view class="coupon_exp">有效期:{{ item.exp_time }}</view>
+          </view>
+          <view class="right_box">
+            <button class="get_btn" v-if="item.is_have == 0" @click="getCoupon(index)">立即领取</button>
+            <button class="get_btn" v-if="item.is_have == 1" @click="toUse(item)">去使用</button>
+          </view>
+        </view>
+      </view>
+    </view>
+    <view class="active_product" v-if="activeInfo.product_list.length">
+      <view class="active_subtitle">活动商品</view>
+      <view class="product_list" :class="show_more_product ? 'more' : ''">
+        <view class="product_item" v-for="(item, index) in activeInfo.product_list" :key="index">
+          <image class="product_image" :src="item.thumb" mode=""></image>
+          <view class="product_name"
+            ><text>{{ item.product_name }}</text></view
+          >
+          <view class="stock_price">
+            <view class="product_price">
+              <text>¥ {{ item.price }} </text>
+            </view>
+            <view class="product_stock">剩{{ item.stock }}个</view>
+          </view>
+        </view>
+      </view>
+      <view class="more_product" v-if="!show_more_product" @click.stop="show_more_product = true">
+        <uni-icons type="down" size="20"></uni-icons>
+      </view>
+    </view>
+    <view class="active_rule" v-if="activeInfo.active_rule">
+      <view class="active_subtitle">活动规则</view>
+      <view class="active_rule_info">
+        <rich-text class="rich_text" :nodes="activeInfo.active_rule"></rich-text>
+      </view>
+    </view>
+    <view class="" style="height: 10rpx"></view>
+  </view>
 </template>
 
 <script>
-	export default {
-		data() {
-			return {
-				// 是否显示更多的产品
-				show_more_product:false,
-				// 活动信息
-				activeInfo:{
-					id:0,
-					name:"",
-					banner_img:"",
-					active_rule:"",
-					status:0,
-					start_time:0,
-					end_time:0,
-					city_ids:"",
-					allow_join:0,
-					start_date:"",
-					end_date:"",
-					coupon_list:[],
-					product_list:[],
-				},
-				// 请求参数
-				requestParam:{
-					id:0
-				},
-			}
-		},
-		onLoad(param) {
-			this.requestParam.id = param.id;
-			// 如果有scene参数的话,获取其中的ID
-			if( param.scene )	{
-				// 转键值对参数
-				let scene		= this.$http.strToParam(param.scene);
-				// 如果没有传入ID,但是传入了场景ID,获取场景ID
-				if( !param.id && scene.id )	this.requestParam.id = scene.id;
-			}
-			// #ifdef MP-WEIXIN
-			//分享按钮
-			uni.showShareMenu({
-				withShareTicket: true,
-				menus: ['shareAppMessage', 'shareTimeline']
-			})
-			// #endif
-		},
-		onShareAppMessage(obj) {
-			return {
-				title: this.activeInfo.name,
-				path: '/pages/coupon/active?id='+this.requestParam.id,
-			}
-		},
-		onShow() {
-			// 登录提示
-			if( !this.$checkAccess.alterLogin() )  return ;
-			// 如果存在产品ID的话
-			if( this.requestParam.id > 0) {
-				// 请求详情
-				this.$http.request('api/coupon_active/get_detail',this.requestParam).then((re)=>{
-					// 成功渲染数据
-					if( re.code == 'success' ) {
-						// 刷新数据
-						this.activeInfo = re.data;
-						// 列表大于2.显示
-						if( re.data.product_list.length <= 2 ) this.show_more_product = true;
-					}else{
-						if( re.code != 'no_login' ){
-							uni.showModal({
-								content:re.msg,
-								showCancel:false,
-							})
-						}
-					}
-				});		
-			}else{
-				uni.showModal({
-					content:"未知的活动ID",
-					showCancel:false,
-				})
-			}
-		},
-		methods: {
-			toUse(item){
-				// 没有范围
-				if( item.type_id == 2 ){
-					uni.switchTab({url:"/pages/index/index"});
-					return;
-				}
-				// 只有一个商品,直接跳转到对应商品
-				if( item.product_scope.length == 1 ){
-					uni.navigateTo({
-						url:"/pages/product/index?product_id="+item.product_scope[0]
-					})
-					return;
-				}
-				// 没有范围
-				if( item.product_scope.length > 1 ){
-					uni.navigateTo({
-						url:"/pages/coupon/product?coupon_id="+item.coupon_id
-					});
-					return;
-				}
-			},
-			getCoupon(index){
-				// 获取对应的数据
-				let couponId = this.activeInfo.coupon_list[index].coupon_id;
-				// 如果不能参与
-				if( !this.activeInfo.allow_join ) {
-					uni.showModal({
-						content:"暂不可参与活动",
-						showCancel:false,
-					})
-					return;
-				}
-				// 如果存在优惠券
-				if( couponId > 0) {
-					// 请求详情
-					this.$http.request('api/custom_coupon/get_coupon',{coupon_id:couponId}).then((re)=>{
-						// 成功渲染数据
-						if( re.code == 'success' ) {
-							this.activeInfo.coupon_list[index].is_have = 1;
-						}else{
-							uni.showModal({
-								content:re.msg,
-								showCancel:false,
-							})
-						}
-					});		
-				}else{
-					uni.showModal({
-						content:"请选择要领取的优惠券",
-						showCancel:false,
-					})
-				}
-			}
-		}
-	}
+export default {
+  data() {
+    return {
+      // 是否显示更多的产品
+      show_more_product: false,
+      // 活动信息
+      activeInfo: {
+        id: 0,
+        name: "",
+        banner_img: "",
+        active_rule: "",
+        status: 0,
+        start_time: 0,
+        end_time: 0,
+        city_ids: "",
+        allow_join: 0,
+        start_date: "",
+        end_date: "",
+        coupon_list: [],
+        product_list: [],
+      },
+      // 请求参数
+      requestParam: {
+        id: 0,
+      },
+    };
+  },
+  onLoad(param) {
+    this.requestParam.id = param.id;
+    // 如果有scene参数的话,获取其中的ID
+    if (param.scene) {
+      // 转键值对参数
+      let scene = this.$http.strToParam(param.scene);
+      // 如果没有传入ID,但是传入了场景ID,获取场景ID
+      if (!param.id && scene.id) this.requestParam.id = scene.id;
+    }
+    // #ifdef MP-WEIXIN
+    //分享按钮
+    uni.showShareMenu({
+      withShareTicket: true,
+      menus: ["shareAppMessage", "shareTimeline"],
+    });
+    // #endif
+  },
+  onShareAppMessage(obj) {
+    return {
+      title: `999智控终端平台\n${this.activeInfo.name}`,
+      path: "/pages/coupon/active?id=" + this.requestParam.id,
+      promise: new Promise((resolve, reject) => {
+        this.$http.request("api/share_message/get_item", { item_id: this.requestParam.id, pages: "/pages/coupon/active" }).then((callback) => {
+          console.log(callback, "api/share_message/get_item");
+          let obj = {
+            title: callback.data?.title == "" ? `999智控终端平台\n${this.activeInfo.name}` : callback.data.title,
+            path: "/pages/coupon/active?id=" + this.requestParam.id,
+          };
+          if (callback.data?.image_url !== "") {
+            obj.imageUrl = callback.data.image_url;
+          }
+          resolve(obj);
+        });
+      }),
+    };
+  },
+  onShow() {
+    // 登录提示
+    if (!this.$checkAccess.alterLogin()) return;
+    // 如果存在产品ID的话
+    if (this.requestParam.id > 0) {
+      // 请求详情
+      this.$http.request("api/coupon_active/get_detail", this.requestParam).then((re) => {
+        // 成功渲染数据
+        if (re.code == "success") {
+          // 刷新数据
+          this.activeInfo = re.data;
+          // 列表大于2.显示
+          if (re.data.product_list.length <= 2) this.show_more_product = true;
+        } else {
+          if (re.code != "no_login") {
+            uni.showModal({
+              content: re.msg,
+              showCancel: false,
+            });
+          }
+        }
+      });
+    } else {
+      uni.showModal({
+        content: "未知的活动ID",
+        showCancel: false,
+      });
+    }
+  },
+  methods: {
+    toUse(item) {
+      // 没有范围
+      if (item.type_id == 2) {
+        uni.switchTab({ url: "/pages/index/index" });
+        return;
+      }
+      // 只有一个商品,直接跳转到对应商品
+      if (item.product_scope.length == 1) {
+        uni.navigateTo({
+          url: "/pages/product/index?product_id=" + item.product_scope[0],
+        });
+        return;
+      }
+      // 没有范围
+      if (item.product_scope.length > 1) {
+        uni.navigateTo({
+          url: "/pages/coupon/product?coupon_id=" + item.coupon_id,
+        });
+        return;
+      }
+    },
+    getCoupon(index) {
+      // 获取对应的数据
+      let couponId = this.activeInfo.coupon_list[index].coupon_id;
+      // 如果不能参与
+      if (!this.activeInfo.allow_join) {
+        uni.showModal({
+          content: "暂不可参与活动",
+          showCancel: false,
+        });
+        return;
+      }
+      // 如果存在优惠券
+      if (couponId > 0) {
+        // 请求详情
+        this.$http.request("api/custom_coupon/get_coupon", { coupon_id: couponId }).then((re) => {
+          // 成功渲染数据
+          if (re.code == "success") {
+            this.activeInfo.coupon_list[index].is_have = 1;
+          } else {
+            uni.showModal({
+              content: re.msg,
+              showCancel: false,
+            });
+          }
+        });
+      } else {
+        uni.showModal({
+          content: "请选择要领取的优惠券",
+          showCancel: false,
+        });
+      }
+    },
+  },
+};
 </script>
 
 <style lang="less">
-	.banner_box{
-		width: 750rpx;
-		height: 240rpx;
-		display: block;
-		overflow: hidden;
-		margin: 0rpx auto;
-		.banner_img{
-			width: 750rpx;
-			height: 240rpx;
-		}
-	}
-	.active_info{
-		width: 750rpx;
-		display: block;
-		overflow: hidden;
-		margin: 0rpx auto;
-		padding: 10rpx 35rpx;
-		background-color: #FFFFFF;
-		.active_name{
-			display: block;
-			height: 60rpx;
-			font-size: 36rpx;
-			font-weight: bold;
-			line-height: 60rpx;
-			overflow: hidden;
-			white-space: nowrap;
-			text-overflow: ellipsis;
-		}
-		.active_time{
-			display: block;
-			height: 40rpx;
-			font-size: 26rpx;
-			line-height: 40rpx;
-			overflow: hidden;
-			white-space: nowrap;
-			text-overflow: ellipsis;
-		}
-		.active_citys{
-			display: block;
-			max-height: 80rpx;
-			font-size: 26rpx;
-			line-height: 40rpx;
-			overflow: hidden;
-			white-space: nowrap;
-			text-overflow: ellipsis;
-		}
-	}
-	.active_coupon{
-		display: block;
-		overflow: hidden;
-		margin-top: 20rpx;
-		padding: 0rpx 35rpx;
-		.active_subtitle{
-			display: block;
-			height: 80rpx;
-			overflow: hidden;
-			font-size: 32rpx;
-			font-weight: bold;
-			line-height: 80rpx;
-		}
-		.coupon_list{
-			display: block;
-			overflow: hidden;
-			.coupon_item{
-				display: block;
-				height: 140rpx;
-				overflow: hidden;
-				padding: 10rpx 25rpx;
-				border-radius: 15rpx;
-				margin-bottom: 10rpx;
-				background-color: #FFFFFF;
-				.left_box{
-					float: left;
-					width: 400rpx;
-					height: 140rpx;
-					display: block;
-					.rebate{
-						color: #E03519;
-						height: 60rpx;
-						overflow: hidden;
-						font-size: 36rpx;
-						line-height: 60rpx;
-						font-weight: bold;
-						white-space: nowrap;
-						text-overflow: ellipsis;
-					}
-					.std_pay{
-						color: #666666;
-						height: 40rpx;
-						font-size: 24rpx;
-						line-height: 40rpx;
-					}
-					.coupon_exp{
-						color: #666666;
-						height: 40rpx;
-						font-size: 24rpx;
-						line-height: 40rpx;
-					}
-				}
-				.right_box{
-					float: right;
-					width: 160rpx;
-					height: 60rpx;
-					display: block;
-					margin-top: 40rpx;
-					.get_btn{
-						display: block;
-						width: 160rpx;
-						height: 60rpx;
-						color: #FFFFFF;
-						font-size: 26rpx;
-						line-height: 60rpx;
-						text-align: center;
-						padding: 0rpx 0rpx;
-						border-radius: 10rpx;
-						background-color: #E03519;
-					}
-				}
-			}
-		}
-	}
-	.active_product{
-		display: block;
-		overflow: hidden;
-		margin-top: 10rpx;
-		padding: 0rpx 35rpx;
-		.active_subtitle{
-			display: block;
-			height: 80rpx;
-			overflow: hidden;
-			font-size: 32rpx;
-			font-weight: bold;
-			line-height: 80rpx;
-		}
-		.product_list{
-			display: block;
-			height: 520rpx;
-			overflow: hidden;
-			.product_item{
-				float: left;
-				width: 320rpx;
-				height: 480rpx;
-				display: block;
-				overflow: hidden;
-				margin-top: 20rpx;
-				margin-right: 40rpx;
-				background-color: #FFFFFF;
-				border-radius: 20rpx;
-				.product_image{
-					width: 320rpx;
-					height: 320rpx;
-				}
-				.product_name{
-					height: 80rpx;
-					font-size: 30rpx;
-					line-height: 40rpx;
-					overflow: hidden;
-					margin: 0rpx 0rpx;
-					padding: 0rpx 10rpx;
-					text-overflow: ellipsis;
-				}
-				.stock_price{
-					color: #dddddd;
-					font-size: 20rpx;
-					overflow: hidden;
-					line-height: 30rpx;
-					padding: 0rpx 10rpx;
-					.product_price{
-						float: left;
-						color: red;
-						font-size: 30rpx;
-						line-height: 60rpx;
-						.product_market{
-							font-size: 24rpx;
-							color: #999999;
-							line-height: 30rpx;
-							vertical-align: top;
-							text-decoration: line-through;
-						}
-					}
-					.product_stock{
-						float: right;
-						font-size: 20rpx;
-						line-height: 60rpx;
-					}
-				}
-			}
-			.product_item:nth-child(even){
-				margin-right: 0rpx;
-			}
-		}
-		.product_list.more{
-			height: auto !important;
-		}
-		.more_product{
-			z-index: 8;
-			left: 0rpx;
-			top: -10rpx;
-			height: 40rpx;
-			display: block;
-			font-size: 20rpx;
-			line-height: 40rpx;
-			text-align: center;
-			position: relative;
-			border-radius: 5rpx;
-			background-color: rgba(0, 0, 0, 0.1);
-		}
-	}
-	.active_rule{
-		display: block;
-		overflow: hidden;
-		margin-top: 10rpx;
-		padding: 0rpx 35rpx;
-		margin-bottom: 160rpx;
-		.active_subtitle{
-			display: block;
-			height: 80rpx;
-			overflow: hidden;
-			font-size: 32rpx;
-			font-weight: bold;
-			line-height: 80rpx;
-		}
-		.active_rule_info{
-			display: block;
-			overflow: hidden;
-			font-size: 24rpx;
-			min-height: 500rpx;
-			line-height: 40rpx;
-			border-radius: 10rpx;
-			padding: 20rpx 20rpx;
-			box-sizing: border-box;
-			background-color: #FFFFFF;
-			.rich_text{
-				white-space: break-spaces;
-			}
-		}
-	}
+.banner_box {
+  width: 750rpx;
+  height: 240rpx;
+  display: block;
+  overflow: hidden;
+  margin: 0rpx auto;
+  .banner_img {
+    width: 750rpx;
+    height: 240rpx;
+  }
+}
+.active_info {
+  width: 750rpx;
+  display: block;
+  overflow: hidden;
+  margin: 0rpx auto;
+  padding: 10rpx 35rpx;
+  background-color: #ffffff;
+  .active_name {
+    display: block;
+    height: 60rpx;
+    font-size: 36rpx;
+    font-weight: bold;
+    line-height: 60rpx;
+    overflow: hidden;
+    white-space: nowrap;
+    text-overflow: ellipsis;
+  }
+  .active_time {
+    display: block;
+    height: 40rpx;
+    font-size: 26rpx;
+    line-height: 40rpx;
+    overflow: hidden;
+    white-space: nowrap;
+    text-overflow: ellipsis;
+  }
+  .active_citys {
+    display: block;
+    max-height: 80rpx;
+    font-size: 26rpx;
+    line-height: 40rpx;
+    overflow: hidden;
+    white-space: nowrap;
+    text-overflow: ellipsis;
+  }
+}
+.active_coupon {
+  display: block;
+  overflow: hidden;
+  margin-top: 20rpx;
+  padding: 0rpx 35rpx;
+  .active_subtitle {
+    display: block;
+    height: 80rpx;
+    overflow: hidden;
+    font-size: 32rpx;
+    font-weight: bold;
+    line-height: 80rpx;
+  }
+  .coupon_list {
+    display: block;
+    overflow: hidden;
+    .coupon_item {
+      display: block;
+      height: 140rpx;
+      overflow: hidden;
+      padding: 10rpx 25rpx;
+      border-radius: 15rpx;
+      margin-bottom: 10rpx;
+      background-color: #ffffff;
+      .left_box {
+        float: left;
+        width: 400rpx;
+        height: 140rpx;
+        display: block;
+        .rebate {
+          color: #e03519;
+          height: 60rpx;
+          overflow: hidden;
+          font-size: 36rpx;
+          line-height: 60rpx;
+          font-weight: bold;
+          white-space: nowrap;
+          text-overflow: ellipsis;
+        }
+        .std_pay {
+          color: #666666;
+          height: 40rpx;
+          font-size: 24rpx;
+          line-height: 40rpx;
+        }
+        .coupon_exp {
+          color: #666666;
+          height: 40rpx;
+          font-size: 24rpx;
+          line-height: 40rpx;
+        }
+      }
+      .right_box {
+        float: right;
+        width: 160rpx;
+        height: 60rpx;
+        display: block;
+        margin-top: 40rpx;
+        .get_btn {
+          display: block;
+          width: 160rpx;
+          height: 60rpx;
+          color: #ffffff;
+          font-size: 26rpx;
+          line-height: 60rpx;
+          text-align: center;
+          padding: 0rpx 0rpx;
+          border-radius: 10rpx;
+          background-color: #e03519;
+        }
+      }
+    }
+  }
+}
+.active_product {
+  display: block;
+  overflow: hidden;
+  margin-top: 10rpx;
+  padding: 0rpx 35rpx;
+  .active_subtitle {
+    display: block;
+    height: 80rpx;
+    overflow: hidden;
+    font-size: 32rpx;
+    font-weight: bold;
+    line-height: 80rpx;
+  }
+  .product_list {
+    display: block;
+    height: 520rpx;
+    overflow: hidden;
+    .product_item {
+      float: left;
+      width: 320rpx;
+      height: 480rpx;
+      display: block;
+      overflow: hidden;
+      margin-top: 20rpx;
+      margin-right: 40rpx;
+      background-color: #ffffff;
+      border-radius: 20rpx;
+      .product_image {
+        width: 320rpx;
+        height: 320rpx;
+      }
+      .product_name {
+        height: 80rpx;
+        font-size: 30rpx;
+        line-height: 40rpx;
+        overflow: hidden;
+        margin: 0rpx 0rpx;
+        padding: 0rpx 10rpx;
+        text-overflow: ellipsis;
+      }
+      .stock_price {
+        color: #dddddd;
+        font-size: 20rpx;
+        overflow: hidden;
+        line-height: 30rpx;
+        padding: 0rpx 10rpx;
+        .product_price {
+          float: left;
+          color: red;
+          font-size: 30rpx;
+          line-height: 60rpx;
+          .product_market {
+            font-size: 24rpx;
+            color: #999999;
+            line-height: 30rpx;
+            vertical-align: top;
+            text-decoration: line-through;
+          }
+        }
+        .product_stock {
+          float: right;
+          font-size: 20rpx;
+          line-height: 60rpx;
+        }
+      }
+    }
+    .product_item:nth-child(even) {
+      margin-right: 0rpx;
+    }
+  }
+  .product_list.more {
+    height: auto !important;
+  }
+  .more_product {
+    z-index: 8;
+    left: 0rpx;
+    top: -10rpx;
+    height: 40rpx;
+    display: block;
+    font-size: 20rpx;
+    line-height: 40rpx;
+    text-align: center;
+    position: relative;
+    border-radius: 5rpx;
+    background-color: rgba(0, 0, 0, 0.1);
+  }
+}
+.active_rule {
+  display: block;
+  overflow: hidden;
+  margin-top: 10rpx;
+  padding: 0rpx 35rpx;
+  margin-bottom: 160rpx;
+  .active_subtitle {
+    display: block;
+    height: 80rpx;
+    overflow: hidden;
+    font-size: 32rpx;
+    font-weight: bold;
+    line-height: 80rpx;
+  }
+  .active_rule_info {
+    display: block;
+    overflow: hidden;
+    font-size: 24rpx;
+    min-height: 500rpx;
+    line-height: 40rpx;
+    border-radius: 10rpx;
+    padding: 20rpx 20rpx;
+    box-sizing: border-box;
+    background-color: #ffffff;
+    .rich_text {
+      white-space: break-spaces;
+    }
+  }
+}
 </style>

+ 8 - 5
pages/index/index.vue

@@ -45,7 +45,10 @@
         <button class="search_btn" @click.stop="searchOpen()" data-eventsync="true">搜索</button>
       </view>
     </view>
-    <view class="to_bottom" v-if="isLast"> -----{{ !productList.length && toSelectedCity ? "请选择您的城市" : "到底啦" }}-----</view>
+    <view class="to_bottom" v-if="isLast" style="display: flex; justify-content: center">
+      -----
+      <view :style="!productList.length && toSelectedCity ? 'font-weight:bold;font-size:36rpx' : ''">{{ !productList.length && toSelectedCity ? "请点击左上角选择你的城市" : "到底啦" }}</view> -----
+    </view>
     <uni-popup ref="addFollow" type="center" class="center_popup">
       <FollowPopup :closePopup="closePopup" />
     </uni-popup>
@@ -95,7 +98,7 @@ export default {
     let shareList = getApp().globalData.shareList;
     // 获取分享信息
     let shareObj = {
-      title: "药优惠 得积分 兑豪礼",
+      title: "999智控终端平台\n药优惠 得积分 兑豪礼",
       path: "/pages/index/index",
       imageUrl: "",
     };
@@ -103,7 +106,7 @@ export default {
     for (let i in shareList) {
       if (shareList[i].pages == "pages/index/index") {
         shareObj.path = shareList[i].path ? shareList[i].path : shareObj.path;
-        shareObj.title = shareList[i].title ? shareList[i].title : shareObj.title;
+        shareObj.title = shareList[i].title ? `999智控终端平台\n${shareList[i].title}` : shareObj.title;
         shareObj.imageUrl = shareList[i].image_url ? shareList[i].image_url : shareObj.imageUrl;
       }
     }
@@ -302,10 +305,10 @@ export default {
     position: relative;
     .city_name {
       float: left;
-      width: 80rpx;
+      width: 100rpx;
       height: 60rpx;
       display: block;
-      font-size: 24rpx;
+      font-size: 30rpx;
       overflow: hidden;
       margin-left: 35rpx;
       line-height: 60rpx;

+ 1 - 1
pages/login/index.vue

@@ -12,7 +12,7 @@
       <!-- #endif -->
       <!-- #ifdef MP-TOUTIAO -->
       <view>
-        <button @click="toutiao_login" class="get_phone">抖音用户手机号授权登录</button>
+        <button open-type="getPhoneNumber" @getphonenumber="getPhonenumber" class="get_phone">抖音用户手机号授权登录</button>
         <!-- <button class="get_phone" style="margin-top: 40rpx; background-color: #fff; color: #333">手机号验证登录</button> -->
         <view class="policy_content">
           <image

+ 1 - 1
pages/orders/lottery.vue

@@ -140,7 +140,7 @@ export default {
   },
   onShareAppMessage(obj) {
     return {
-      title: this.activeInfo.name,
+      title: `999智控终端平台\n${this.activeInfo.name}`,
       path: "/pages/orders/lottery?id=" + this.requestParam.id,
     };
   },

+ 1 - 1
pages/orders/receipt.vue

@@ -55,7 +55,7 @@ export default {
       localImage: "",
       orderInfo: {},
       shareInfo: {
-        title: "我已经完成一笔订单,你也快来吧",
+        title: "999智控终端平台\n我已经完成一笔订单,你也快来吧",
         path: "/pages/index/index",
         imageUrl: "",
       },

+ 15 - 2
pages/product/index.vue

@@ -412,8 +412,21 @@
 		},
 		onShareAppMessage(obj) {
 			return {
-				title: this.productInfo.name,
-				path: '/pages/product/index?product_id=' + this.productInfo.id
+				title: `999智控终端平台\n${this.productInfo.name}`,
+				path: '/pages/product/index?product_id=' + this.productInfo.id,
+				promise: new Promise((resolve, reject) => {
+					this.$http.request("api/share_message/get_item", { item_id: this.productInfo.id, pages: "/pages/product/index" }).then((callback) => {
+					console.log(callback, "api/share_message/get_item");
+					let obj = {
+						title: callback.data?.title == "" ? `999智控终端平台\n${this.productInfo.name}` : callback.data.title,
+						path: '/pages/product/index?product_id=' + this.productInfo.id,
+					};
+					if (callback.data?.image_url !== "") {
+						obj.imageUrl = callback.data.image_url;
+					}
+					resolve(obj);
+					});
+				}),
 			}
 		},
 		onShow() {

+ 74 - 86
pages/recruitment/index.vue

@@ -2,32 +2,20 @@
   <view>
     <view class="main_view">
       <image v-if="action_info.banner_img" :src="action_info.banner_img" class="banner_img"></image>
-      <view class="active_title">
-          活动内容
-      </view>
+      <view class="active_title"> 活动内容 </view>
       <view class="clockin_box" v-if="active_rule.length > 0">
-        <view class="box_title">
-          邀请好友成功注册,即可获得奖励
-        </view>
-        <view class="box_time_text">
-          三步奖励到账
-        </view>
+        <view class="box_title"> 邀请好友成功注册,即可获得奖励 </view>
+        <view class="box_time_text"> 三步奖励到账 </view>
         <view class="box_text">
-          <uni-steps mode="number" deactiveColor="#1aad19" :options="[{title: '邀请新人好友'}, {title: '好友注册成功'}, {title: '奖励到账'}]" :active="3"></uni-steps>
-        </view>
-        <view class="box_time_text">
-              活动时间
-        </view>
-        <view class="box_time">
-          {{ action_info.start_time }} 至 {{ action_info.end_time }}
+          <uni-steps mode="number" deactiveColor="#1aad19" :options="[{ title: '邀请新人好友' }, { title: '好友注册成功' }, { title: '奖励到账' }]" :active="3"></uni-steps>
         </view>
+        <view class="box_time_text"> 活动时间 </view>
+        <view class="box_time"> {{ action_info.start_time }} 至 {{ action_info.end_time }} </view>
         <navigator url="/pages/recruitment/record" class="score_record">我的奖励记录 &gt;</navigator>
         <button class="clockin_rule_btn" @click="showRule">活动规则 &gt;</button>
       </view>
       <view class="clockin_box" v-else>
-        <view class="box_title">
-          暂无拉新活动
-        </view>
+        <view class="box_title"> 暂无拉新活动 </view>
       </view>
       <uni-popup ref="clockinRule" type="center">
         <view class="clockin_rule_box">
@@ -35,7 +23,7 @@
             <text>签到规则</text>
             <view class="close_btn" @click="closeRule"> X </view>
           </view>
-          <scroll-view class="clockin_rule_info" scroll-y="true" >
+          <scroll-view class="clockin_rule_info" scroll-y="true">
             <rich-text :nodes="active_rule" class="rich_text"></rich-text>
           </scroll-view>
         </view>
@@ -49,52 +37,52 @@ export default {
   data() {
     return {
       status_bar_style: {},
-      action_info:[],
+      action_info: [],
       isReqing: false,
       listKey: 0,
       listLength: 0,
       active_id: 0,
       active_rule: "",
-    }
+    };
   },
   onLoad(param) {
     // 存储分享标识
-    if (param.share_uid){
-      uni.setStorageSync('share_uid',param.share_uid);
-      console.log('share_uid',param.share_uid)
+    if (param.share_uid) {
+      uni.setStorageSync("share_uid", param.share_uid);
+      console.log("share_uid", param.share_uid);
     }
     //分享按钮
     uni.showShareMenu({
       withShareTicket: true,
-      menus: ['shareAppMessage', 'shareTimeline']
-    })
+      menus: ["shareAppMessage", "shareTimeline"],
+    });
   },
   onShareAppMessage(obj) {
     //获取当前用户信息
-    let userInfo  = uni.getStorageSync("userInfo");
-    let param     = '';
-    if (userInfo.uid){
-      param       = '?share_uid='+userInfo.uid;
+    let userInfo = uni.getStorageSync("userInfo");
+    let param = "";
+    if (userInfo.uid) {
+      param = "?share_uid=" + userInfo.uid;
     }
-    console.log(222,param)
+    console.log(222, param);
     // 获取分享信息
-    let shareList 	= getApp().globalData.shareList;
+    let shareList = getApp().globalData.shareList;
     // 获取分享信息
-    let shareObj	= {
-      title: '药优惠 得积分 兑豪礼',
-      path: '/pages/recruitment/index',
-      imageUrl:'',
+    let shareObj = {
+      title: "999智控终端平台\n药优惠 得积分 兑豪礼",
+      path: "/pages/recruitment/index",
+      imageUrl: "",
     };
     // 循环列表
-    for ( let i in shareList ) {
-      if( shareList[i].pages == 'pages/recruitment/index' ) {
-        shareObj.path  = shareList[i].path ? shareList[i].path : shareObj.path ;
-        shareObj.title  = shareList[i].title ? shareList[i].title : shareObj.title ;
-        shareObj.imageUrl  = shareList[i].image_url ? shareList[i].image_url : shareObj.imageUrl ;
+    for (let i in shareList) {
+      if (shareList[i].pages == "pages/recruitment/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;
       }
     }
-    if (param){
-      shareObj.path   +=  param;
+    if (param) {
+      shareObj.path += param;
     }
     // 返回分享信息
     return shareObj;
@@ -107,39 +95,39 @@ export default {
     // 设置请求中
     this.isReqing = true;
     // 请求列表
-    this.$http.request('/api/recruitment/get_info', this.requestParam).then((re) => {
+    this.$http.request("/api/recruitment/get_info", this.requestParam).then((re) => {
       // 设置非请求中
       this.isReqing = false;
       // 成功结果
-      if (re.code == 'success') {
+      if (re.code == "success") {
         this.action_info = re.data;
         this.active_rule = this.action_info.active_rule;
-        console.log(this.action_info.length)
+        console.log(this.action_info.length);
       }
     });
   },
   methods: {
-    showRule(){
-      this.$refs.clockinRule.open('center')
+    showRule() {
+      this.$refs.clockinRule.open("center");
     },
-    closeRule(){
+    closeRule() {
       this.$refs.clockinRule.close();
-    }
-  }
-}
+    },
+  },
+};
 </script>
 
 <style lang="less">
 page {
-  background-color: #FFFFFF;
+  background-color: #ffffff;
 }
 .main_view {
   display: block;
   height: 1000rpx;
-  background: linear-gradient(to bottom, #FC335F 0%, #FB7224 50%, #FFFFFF 100%);
-  .banner_img{
+  background: linear-gradient(to bottom, #fc335f 0%, #fb7224 50%, #ffffff 100%);
+  .banner_img {
     height: 450rpx;
-    width:  100%;
+    width: 100%;
   }
   .status_bar {
     width: 100%;
@@ -147,15 +135,15 @@ page {
     display: block;
     padding-top: var(--status-bar-height);
   }
-  .active_title{
+  .active_title {
     width: 700rpx;
     height: 80rpx;
     line-height: 80rpx;
     text-align: center;
     margin: 0rpx auto;
     border-radius: 30rpx;
-    background-color: #F86526;
-    color: #F9F9F9;
+    background-color: #f86526;
+    color: #f9f9f9;
   }
   .clockin_box {
     z-index: 9;
@@ -164,8 +152,8 @@ page {
     margin: 0rpx auto;
     position: relative;
     border-radius: 40rpx;
-    background-color: #FFFFFF;
-    box-shadow: 5rpx 5rpx 2rpx 0rpx #DDDDDD;
+    background-color: #ffffff;
+    box-shadow: 5rpx 5rpx 2rpx 0rpx #dddddd;
 
     .box_title {
       padding-top: 20rpx;
@@ -174,15 +162,15 @@ page {
       text-align: center;
       line-height: 80rpx;
     }
-    .box_text{
+    .box_text {
       padding-top: 20rpx;
     }
-    .box_time_text{
+    .box_time_text {
       padding-top: 40rpx;
       text-align: center;
       color: #e15c21;
     }
-    .box_time{
+    .box_time {
       padding-top: 20rpx;
       text-align: center;
       color: #555555;
@@ -203,7 +191,7 @@ page {
         margin-left: 25rpx;
         border-radius: 20rpx;
         margin-bottom: 20rpx;
-        background-color: #F8F8F8;
+        background-color: #f8f8f8;
 
         .what_day {
           display: block;
@@ -320,25 +308,25 @@ page {
         width: 315rpx;
       }*/
       .clockin_item.acitve {
-        color: #FFFFFF;
-        background-color: #E03519;
+        color: #ffffff;
+        background-color: #e03519;
       }
     }
 
     .clockin_btn {
       width: 660rpx;
-      color: #FFFFFF;
+      color: #ffffff;
       font-size: 30rpx;
       margin-top: 20rpx;
       padding: 0rpx 0rpx;
       border-radius: 60rpx;
-      background-color: #E03519;
+      background-color: #e03519;
       border: 0rpx solid transparent;
     }
 
     .clockin_btn.active {
-      color: #FFFFFF;
-      background-color: #AAAAAA;
+      color: #ffffff;
+      background-color: #aaaaaa;
     }
 
     .clockin_btn::after {
@@ -355,7 +343,7 @@ page {
       line-height: 80rpx;
     }
 
-    .clockin_rule_btn{
+    .clockin_rule_btn {
       color: #999999;
       overflow: hidden;
       font-size: 24rpx;
@@ -364,34 +352,34 @@ page {
       padding: 0rpx 0rpx;
       background: transparent;
     }
-    .clockin_rule_btn::after{
+    .clockin_rule_btn::after {
       border: 0rpx solid transparent;
     }
   }
 }
-.popup{
+.popup {
   overflow: hidden;
 }
-.clockin_rule_box{
+.clockin_rule_box {
   width: 500rpx;
   display: block;
   overflow: hidden;
-  background: #FFFFFF;
+  background: #ffffff;
   font-size: 26rpx;
   margin: 0rpx auto;
   line-height: 50rpx;
   border-radius: 10rpx;
   padding: 0rpx 25rpx;
   padding-bottom: 20rpx;
-  background: linear-gradient(to bottom, #FC335F 0%, #FB7224 100%);
-  .clockin_rule_title{
-    color: #FFFFFF;
+  background: linear-gradient(to bottom, #fc335f 0%, #fb7224 100%);
+  .clockin_rule_title {
+    color: #ffffff;
     height: 60rpx;
     font-size: 32rpx;
     line-height: 60rpx;
     text-align: center;
     margin-bottom: 10rpx;
-    .close_btn{
+    .close_btn {
       float: right;
       width: 40rpx;
       height: 40rpx;
@@ -399,10 +387,10 @@ page {
       margin-top: 9rpx;
       line-height: 40rpx;
       border-radius: 50%;
-      border: 1rpx solid #FFFFFF;
+      border: 1rpx solid #ffffff;
     }
   }
-  .clockin_rule_info{
+  .clockin_rule_info {
     display: block;
     height: 500rpx;
     font-size: 24rpx;
@@ -410,10 +398,10 @@ page {
     border-radius: 10rpx;
     padding: 20rpx 20rpx;
     box-sizing: border-box;
-    background-color: #FFFFFF;
-    .rich_text{
+    background-color: #ffffff;
+    .rich_text {
       white-space: break-spaces;
     }
   }
 }
-</style>
+</style>

+ 2 - 2
pages/score/clockin.vue

@@ -106,7 +106,7 @@ export default {
     let shareList = getApp().globalData.shareList;
     // 获取分享信息
     let shareObj = {
-      title: "药优惠 得积分 兑豪礼",
+      title: "999智控终端平台\n药优惠 得积分 兑豪礼",
       path: "/pages/score/clockin",
       imageUrl: "",
     };
@@ -114,7 +114,7 @@ export default {
     for (let i in shareList) {
       if (shareList[i].pages == "pages/score/clockin") {
         shareObj.path = shareList[i].path ? shareList[i].path : shareObj.path;
-        shareObj.title = shareList[i].title ? shareList[i].title : shareObj.title;
+        shareObj.title = shareList[i].title ? `999智控终端平台\n${shareList[i].title}` : shareObj.title;
         shareObj.imageUrl = shareList[i].image_url ? shareList[i].image_url : shareObj.imageUrl;
       }
     }

+ 291 - 289
pages/score/index.vue

@@ -1,297 +1,299 @@
 <template>
-	<view>
-		<view class="product_box">
-			<view class="to_bottom" v-if="!productList.length"> -----还没有积分产品-----</view>
-			<view class="product_list" >
-				<!-- Vue3 项目部分小程序端事件延迟或调用失败 在执行事件的元素上添加 data-eventsync="true" 属性以解决此问题 -->
-				<view @click="toDetail(item)" data-eventsync="true" class="product_item" v-for="(item,index) in productList" :key="index" >
-					<image class="product_image" :src="item.thumb" mode=""></image>
-					<view class="product_name"><text>{{item.name}}</text></view>
-					<view class="stock_price">
-						<view class="product_price">
-							<text>{{item.score}} 积分</text>
-						</view>
-					</view>
-				</view>
-			</view>
-		</view>
-		<view class="search_fixed" >
-			<view class="search_box">
-				<input class="search_input" type="text" v-model="requestParam.name" @input="searchChange" placeholder="请输入产品名称搜索" />
-				<button class="search_btn" @click.stop="searchOpen()"  data-eventsync="true"> 搜索</button>
-			</view>
-		</view>
-		<view class="to_bottom" v-if="isLast"> -----到底了-----</view>
-	</view>
+  <view>
+    <view class="product_box">
+      <view class="to_bottom" v-if="!productList.length"> -----还没有积分产品-----</view>
+      <view class="product_list">
+        <!-- Vue3 项目部分小程序端事件延迟或调用失败 在执行事件的元素上添加 data-eventsync="true" 属性以解决此问题 -->
+        <view @click="toDetail(item)" data-eventsync="true" class="product_item" v-for="(item, index) in productList" :key="index">
+          <image class="product_image" :src="item.thumb" mode=""></image>
+          <view class="product_name"
+            ><text>{{ item.name }}</text></view
+          >
+          <view class="stock_price">
+            <view class="product_price">
+              <text>{{ item.score }} 积分</text>
+            </view>
+          </view>
+        </view>
+      </view>
+    </view>
+    <view class="search_fixed">
+      <view class="search_box">
+        <input class="search_input" type="text" v-model="requestParam.name" @input="searchChange" placeholder="请输入产品名称搜索" />
+        <button class="search_btn" @click.stop="searchOpen()" data-eventsync="true">搜索</button>
+      </view>
+    </view>
+    <view class="to_bottom" v-if="isLast"> -----到底了-----</view>
+  </view>
 </template>
 
 <script>
-	export default {
-		data() {
-			return {
-				// 产品列表
-				productList:[],
-				// 请求参数
-				requestParam:{
-					name:"",
-					page:1,
-				},
-				// 是否最后一页
-				isLast:false,
-				// 是否请求中
-				isReqing:false,
-			}
-		},
-		onLoad() {
-			// #ifdef MP-WEIXIN
-			//分享按钮
-			uni.showShareMenu({
-				withShareTicket: true,
-				menus: ['shareAppMessage', 'shareTimeline']
-			})
-			// #endif
-		},
-		onShareAppMessage(obj) {
-			// 获取分享信息
-			let shareList 	= getApp().globalData.shareList;
-			// 获取分享信息
-			let shareObj	= {
-								title: '药优惠 得积分 兑豪礼',
-								path: '/pages/score/index',
-								imageUrl:'',
-							};
-			// 循环列表
-			for ( let i in shareList ) {
-				if( shareList[i].pages == 'pages/score/index' ) {
-					shareObj.path  = shareList[i].path ? shareList[i].path : shareObj.path ;
-					shareObj.title  = shareList[i].title ? shareList[i].title : shareObj.title ;
-					shareObj.imageUrl  = shareList[i].image_url ? shareList[i].image_url : shareObj.imageUrl ;
-				}
-			}
-			// 返回分享信息
-			return shareObj;
-		},
-		onShow() {
-			// 没有数据的话,或者请求中,不允许刷新
-			if( this.isReqing )		return ;
-			// 请求参数
-			this.requestParam.name	= "";
-			// 请求参数
-			this.requestParam.page	= 1;
-			// 是否是最后一页
-			this.isLast			 	= false;
-			// 设置请求中
-			this.isReqing			= true;
-			// 请求
-			this.$http.request('api/score_product/get_list',this.requestParam).then((re)=>{
-				// 设置非请求中
-				this.isReqing		= false;
-				// 成功结果
-				if( re.code == 'success' ){
-					if(re.data.last_page <= this.requestParam.page ) this.isLast = true;
-					this.productList = re.data.data;
-				}
-			});
-		},
-		onPullDownRefresh() {
-			// 如果请求中,不允许请求,
-			if( this.isReqing )		return uni.stopPullDownRefresh();
-			// 初始化页码为1
-			this.requestParam.page	= 1;
-			// 是否是最后一页
-			this.isLast			 	= false;
-			// 设置请求中
-			this.isReqing			= true;
-			// 请求列表
-			this.$http.request('api/score_product/get_list',this.requestParam).then((re)=>{
-				// 设置非请求中
-				this.isReqing		= false;
-				// 成功结果
-				if( re.code == 'success' ){
-					if(re.data.last_page <= this.requestParam.page ) this.isLast = true;
-					this.productList = re.data.data;
-				}
-			});
-			uni.stopPullDownRefresh();
-		},
-		onReachBottom() {
-			// 如果页码是0,避免第一页重复
-			if( this.requestParam.page < 1 ) return;
-			// 最后一页不再请求
-			if( this.isLast ) 	return;
-			// 请求中,不再请求
-			if( this.isReqing ) return;
-			// 增加一页
-			this.requestParam.page = this.requestParam.page+1;
-			// 设置请求中
-			this.isReqing			= true;
-			// 请求列表
-			this.$http.request('api/score_product/get_list',this.requestParam).then((re)=>{
-				// 设置非请求中
-				this.isReqing		= false;
-				// 成功结果
-				if( re.code == 'success' ){
-					// 最后一页
-					if(re.data.last_page <= this.requestParam.page ) this.isLast = true;
-					// 追加数据
-					this.productList.push(...re.data.data);
-				}
-			});
-		},
-		methods: {
-			searchChange(e){
-				// 如果没有搜索词
-				if( !this.requestParam.name ){
-					this.searchOpen();
-				}
-			},
-			searchOpen(){
-				// 请求中,不再请求
-				if( this.isReqing ) 	return;
-				// 是否是最后一页
-				this.isLast			 	= false;
-				// 初始化页码为1
-				this.requestParam.page	= 1;
-				// 设置请求中
-				this.isReqing			= true;
-				// 请求列表
-				this.$http.request('api/score_product/get_list',this.requestParam).then((re)=>{
-					// 设置非请求中
-					this.isReqing		= false;
-					// 成功结果
-					if( re.code == 'success' ){
-						this.productList = re.data.data;
-						if( re.data.data.length && re.data.last_page >= this.requestParam.page ) this.isLast = true;
-					}
-				});
-			},
-			toDetail(item){
-				uni.navigateTo({
-					url:"/pages/score/product?id="+item.id,
-				})
-			}
-		}
-	}
+export default {
+  data() {
+    return {
+      // 产品列表
+      productList: [],
+      // 请求参数
+      requestParam: {
+        name: "",
+        page: 1,
+      },
+      // 是否最后一页
+      isLast: false,
+      // 是否请求中
+      isReqing: false,
+    };
+  },
+  onLoad() {
+    // #ifdef MP-WEIXIN
+    //分享按钮
+    uni.showShareMenu({
+      withShareTicket: true,
+      menus: ["shareAppMessage", "shareTimeline"],
+    });
+    // #endif
+  },
+  onShareAppMessage(obj) {
+    // 获取分享信息
+    let shareList = getApp().globalData.shareList;
+    // 获取分享信息
+    let shareObj = {
+      title: "999智控终端平台\n药优惠 得积分 兑豪礼",
+      path: "/pages/score/index",
+      imageUrl: "",
+    };
+    // 循环列表
+    for (let i in shareList) {
+      if (shareList[i].pages == "pages/score/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;
+      }
+    }
+    // 返回分享信息
+    return shareObj;
+  },
+  onShow() {
+    // 没有数据的话,或者请求中,不允许刷新
+    if (this.isReqing) return;
+    // 请求参数
+    this.requestParam.name = "";
+    // 请求参数
+    this.requestParam.page = 1;
+    // 是否是最后一页
+    this.isLast = false;
+    // 设置请求中
+    this.isReqing = true;
+    // 请求
+    this.$http.request("api/score_product/get_list", this.requestParam).then((re) => {
+      // 设置非请求中
+      this.isReqing = false;
+      // 成功结果
+      if (re.code == "success") {
+        if (re.data.last_page <= this.requestParam.page) this.isLast = true;
+        this.productList = re.data.data;
+      }
+    });
+  },
+  onPullDownRefresh() {
+    // 如果请求中,不允许请求,
+    if (this.isReqing) return uni.stopPullDownRefresh();
+    // 初始化页码为1
+    this.requestParam.page = 1;
+    // 是否是最后一页
+    this.isLast = false;
+    // 设置请求中
+    this.isReqing = true;
+    // 请求列表
+    this.$http.request("api/score_product/get_list", this.requestParam).then((re) => {
+      // 设置非请求中
+      this.isReqing = false;
+      // 成功结果
+      if (re.code == "success") {
+        if (re.data.last_page <= this.requestParam.page) this.isLast = true;
+        this.productList = re.data.data;
+      }
+    });
+    uni.stopPullDownRefresh();
+  },
+  onReachBottom() {
+    // 如果页码是0,避免第一页重复
+    if (this.requestParam.page < 1) return;
+    // 最后一页不再请求
+    if (this.isLast) return;
+    // 请求中,不再请求
+    if (this.isReqing) return;
+    // 增加一页
+    this.requestParam.page = this.requestParam.page + 1;
+    // 设置请求中
+    this.isReqing = true;
+    // 请求列表
+    this.$http.request("api/score_product/get_list", this.requestParam).then((re) => {
+      // 设置非请求中
+      this.isReqing = false;
+      // 成功结果
+      if (re.code == "success") {
+        // 最后一页
+        if (re.data.last_page <= this.requestParam.page) this.isLast = true;
+        // 追加数据
+        this.productList.push(...re.data.data);
+      }
+    });
+  },
+  methods: {
+    searchChange(e) {
+      // 如果没有搜索词
+      if (!this.requestParam.name) {
+        this.searchOpen();
+      }
+    },
+    searchOpen() {
+      // 请求中,不再请求
+      if (this.isReqing) return;
+      // 是否是最后一页
+      this.isLast = false;
+      // 初始化页码为1
+      this.requestParam.page = 1;
+      // 设置请求中
+      this.isReqing = true;
+      // 请求列表
+      this.$http.request("api/score_product/get_list", this.requestParam).then((re) => {
+        // 设置非请求中
+        this.isReqing = false;
+        // 成功结果
+        if (re.code == "success") {
+          this.productList = re.data.data;
+          if (re.data.data.length && re.data.last_page >= this.requestParam.page) this.isLast = true;
+        }
+      });
+    },
+    toDetail(item) {
+      uni.navigateTo({
+        url: "/pages/score/product?id=" + item.id,
+      });
+    },
+  },
+};
 </script>
 
 <style lang="less">
-	.search_fixed{
-		top: var(--window-top);
-		left: 0rpx;
-		width: 750rpx;
-		display: block;
-		position: fixed;
-		margin: 0rpx auto;
-		padding: 20rpx 0rpx;
-		background-color: #FFFFFF;
-		.search_box{
-			width: 750rpx;
-			height: 60rpx;
-			display: block;
-			position: relative;
-			.search_input{
-				z-index: 0;
-				width: 590rpx;
-				height: 56rpx;
-				display: block;
-				font-size: 24rpx;
-				position: relative;
-				border-top-left-radius: 40rpx;
-				border-bottom-left-radius: 40rpx;
-				padding-left: 20rpx;
-				margin-left: 35rpx;
-				border: 2rpx solid #dddddd;
-			}
-			.search_btn{
-				top: 0rpx;
-				z-index: 9;
-				left: 610rpx;
-				color: #FFFFFF;
-				position: absolute;
-				display: block;
-				width: 120rpx;
-				height: 60rpx;
-				font-size: 24rpx;
-				margin: 0rpx 0rpx;
-				padding: 0rpx 0rpx;
-				line-height: 60rpx;
-				border-radius: 40rpx;
-				background-color: #E03519;
-			}
-		}
-	}
-	.product_box{
-		display: block;
-		overflow: hidden;
-		margin: 0rpx auto;
-		margin-top: 120rpx;
-		padding: 0rpx 35rpx;
-		.product_list{
-			display: block;
-			overflow: hidden;
-			margin: 0rpx auto;
-			.product_item{
-				float: left;
-				width: 320rpx;
-				height: 490rpx;
-				display: block;
-				overflow: hidden;
-				margin: 20rpx 0rpx;
-				margin-right: 40rpx;
-				background-color: #FFFFFF;
-				border-radius: 20rpx;
-				.product_image{
-					width: 320rpx;
-					height: 320rpx;
-				}
-				.product_name{
-					height: 80rpx;
-					font-size: 30rpx;
-					line-height: 40rpx;
-					overflow: hidden;
-					margin: 10rpx 0rpx;
-					padding: 0rpx 10rpx;
-					text-overflow: ellipsis;
-				}
-				.product_spec{
-					height: 30rpx;
-					color: #999999;
-					font-size: 24rpx;
-					line-height: 30rpx;
-					padding: 0rpx 10rpx;
-					overflow: hidden;
-					white-space: nowrap;
-					text-overflow: ellipsis;
-				}
-				.stock_price{
-					color: #dddddd;
-					font-size: 20rpx;
-					overflow: hidden;
-					line-height: 30rpx;
-					padding: 0rpx 10rpx;
-					.product_price{
-						float: left;
-						color: red;
-						font-size: 30rpx;
-						line-height: 60rpx;
-						.product_market{
-							font-size: 24rpx;
-							color: #999999;
-							line-height: 30rpx;
-							vertical-align: top;
-							text-decoration: line-through;
-						}
-					}
-					.product_stock{
-						float: right;
-						font-size: 20rpx;
-						line-height: 60rpx;
-					}
-				}
-			}
-			.product_item:nth-child(even){
-				margin-right: 0rpx;
-			}
-		}
-	}
+.search_fixed {
+  top: var(--window-top);
+  left: 0rpx;
+  width: 750rpx;
+  display: block;
+  position: fixed;
+  margin: 0rpx auto;
+  padding: 20rpx 0rpx;
+  background-color: #ffffff;
+  .search_box {
+    width: 750rpx;
+    height: 60rpx;
+    display: block;
+    position: relative;
+    .search_input {
+      z-index: 0;
+      width: 590rpx;
+      height: 56rpx;
+      display: block;
+      font-size: 24rpx;
+      position: relative;
+      border-top-left-radius: 40rpx;
+      border-bottom-left-radius: 40rpx;
+      padding-left: 20rpx;
+      margin-left: 35rpx;
+      border: 2rpx solid #dddddd;
+    }
+    .search_btn {
+      top: 0rpx;
+      z-index: 9;
+      left: 610rpx;
+      color: #ffffff;
+      position: absolute;
+      display: block;
+      width: 120rpx;
+      height: 60rpx;
+      font-size: 24rpx;
+      margin: 0rpx 0rpx;
+      padding: 0rpx 0rpx;
+      line-height: 60rpx;
+      border-radius: 40rpx;
+      background-color: #e03519;
+    }
+  }
+}
+.product_box {
+  display: block;
+  overflow: hidden;
+  margin: 0rpx auto;
+  margin-top: 120rpx;
+  padding: 0rpx 35rpx;
+  .product_list {
+    display: block;
+    overflow: hidden;
+    margin: 0rpx auto;
+    .product_item {
+      float: left;
+      width: 320rpx;
+      height: 490rpx;
+      display: block;
+      overflow: hidden;
+      margin: 20rpx 0rpx;
+      margin-right: 40rpx;
+      background-color: #ffffff;
+      border-radius: 20rpx;
+      .product_image {
+        width: 320rpx;
+        height: 320rpx;
+      }
+      .product_name {
+        height: 80rpx;
+        font-size: 30rpx;
+        line-height: 40rpx;
+        overflow: hidden;
+        margin: 10rpx 0rpx;
+        padding: 0rpx 10rpx;
+        text-overflow: ellipsis;
+      }
+      .product_spec {
+        height: 30rpx;
+        color: #999999;
+        font-size: 24rpx;
+        line-height: 30rpx;
+        padding: 0rpx 10rpx;
+        overflow: hidden;
+        white-space: nowrap;
+        text-overflow: ellipsis;
+      }
+      .stock_price {
+        color: #dddddd;
+        font-size: 20rpx;
+        overflow: hidden;
+        line-height: 30rpx;
+        padding: 0rpx 10rpx;
+        .product_price {
+          float: left;
+          color: red;
+          font-size: 30rpx;
+          line-height: 60rpx;
+          .product_market {
+            font-size: 24rpx;
+            color: #999999;
+            line-height: 30rpx;
+            vertical-align: top;
+            text-decoration: line-through;
+          }
+        }
+        .product_stock {
+          float: right;
+          font-size: 20rpx;
+          line-height: 60rpx;
+        }
+      }
+    }
+    .product_item:nth-child(even) {
+      margin-right: 0rpx;
+    }
+  }
+}
 </style>

+ 2 - 2
pages/score/lottery.vue

@@ -143,7 +143,7 @@ export default {
     let shareList = getApp().globalData.shareList;
     // 获取分享信息
     let shareObj = {
-      title: "药优惠 得积分 兑豪礼",
+      title: "999智控终端平台\n药优惠 得积分 兑豪礼",
       path: "/pages/score/lottery",
       imageUrl: "",
     };
@@ -151,7 +151,7 @@ export default {
     for (let i in shareList) {
       if (shareList[i].pages == "pages/score/lottery") {
         shareObj.path = shareList[i].path ? shareList[i].path : shareObj.path;
-        shareObj.title = shareList[i].title ? shareList[i].title : shareObj.title;
+        shareObj.title = shareList[i].title ? `999智控终端平台\n${shareList[i].title}` : shareObj.title;
         shareObj.imageUrl = shareList[i].image_url ? shareList[i].image_url : shareObj.imageUrl;
       }
     }

+ 14 - 1
pages/score/product.vue

@@ -159,8 +159,21 @@ export default {
   },
   onShareAppMessage(obj) {
     return {
-      title: this.productInfo.name,
+      title: `999智控终端平台\n${this.productInfo.name}`,
       path: "/pages/score/product?id=" + this.productInfo.id,
+      promise: new Promise((resolve, reject) => {
+        this.$http.request("api/share_message/get_item", { item_id: this.productInfo.id, pages: "/pages/score/product" }).then((callback) => {
+          console.log(callback, "api/share_message/get_item");
+          let obj = {
+            title: callback.data?.title == "" ? `999智控终端平台\n${this.productInfo.name}` : callback.data.title,
+            path: "/pages/score/product?id=" + this.productInfo.id,
+          };
+          if (callback.data?.image_url !== "") {
+            obj.imageUrl = callback.data.image_url;
+          }
+          resolve(obj);
+        });
+      }),
     };
   },
   onShow() {

+ 2 - 2
pages/user/index.vue

@@ -100,7 +100,7 @@ export default {
     let shareList = getApp().globalData.shareList;
     // 获取分享信息
     let shareObj = {
-      title: "药优惠 得积分 兑豪礼",
+      title: "999智控终端平台\n药优惠 得积分 兑豪礼",
       //path: '/pages/score/lottery',
       path: "/pages/user/index",
       imageUrl: "",
@@ -109,7 +109,7 @@ 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 ? shareList[i].title : shareObj.title;
+        shareObj.title = shareList[i].title ? `999智控终端平台\n${shareList[i].title}` : shareObj.title;
         shareObj.imageUrl = shareList[i].image_url ? shareList[i].image_url : shareObj.imageUrl;
       }
     }

+ 128 - 120
utils/checkaccess.js

@@ -1,144 +1,152 @@
 // 检查登录
 const checkLogin = () => {
-	// 获取登录标识
-	let userLogin = uni.getStorageSync('userLogin');
-	// 如果不存在的话
-	if (!userLogin || !userLogin.authcode || userLogin.expires_in <= Math.floor(new Date().getTime() / 1000)) {
-		// 未登录
-		return false;
-	}
-	// 登录成功
-	return true;
-}
+  // 获取登录标识
+  let userLogin = uni.getStorageSync("userLogin");
+  // 如果不存在的话
+  if (!userLogin || !userLogin.authcode || userLogin.expires_in <= Math.floor(new Date().getTime() / 1000)) {
+    // 未登录
+    return false;
+  }
+  // 登录成功
+  return true;
+};
 
 // 登录提示
 const alterLogin = () => {
-	// 获取登录标识
-	let userLogin = uni.getStorageSync('userLogin');
-	// 如果不存在的话
-	if (!userLogin || !userLogin.authcode || userLogin.expires_in <= Math.floor(new Date().getTime() / 1000)) {
-		// 未登录
-		uni.showModal({
-			title: "请登录",
-			success(res) {
-				if (res.confirm) {
-					// 用户点击确定按钮
-					uni.navigateTo({
-						url: "/pages/login/index"
-					})
-				}
-			}
-		})
-		return false;
-	}
-	// 登录成功
-	return true;
-}
-
+  // 获取登录标识
+  let userLogin = uni.getStorageSync("userLogin");
+  // 如果不存在的话
+  if (!userLogin || !userLogin.authcode || userLogin.expires_in <= Math.floor(new Date().getTime() / 1000)) {
+    // 未登录
+    uni.showModal({
+      title: "请登录",
+      success(res) {
+        if (res.confirm) {
+          // 用户点击确定按钮
+          uni.navigateTo({
+            url: "/pages/login/index",
+          });
+        }
+      },
+    });
+    return false;
+  }
+  // 登录成功
+  return true;
+};
 
 const onlyCheckAccess = () => {
-	// 获取登录标识
-	let userLogin = uni.getStorageSync('userLogin');
-	// 如果不存在的话
-	if (!userLogin || !userLogin.authcode || userLogin.expires_in <= Math.floor(new Date().getTime() / 1000)) {
-		// 未登录
-		return false;
-	}
-	// 登录成功
-	return true;
-}
-
-
+  // 获取登录标识
+  let userLogin = uni.getStorageSync("userLogin");
+  // 如果不存在的话
+  if (!userLogin || !userLogin.authcode || userLogin.expires_in <= Math.floor(new Date().getTime() / 1000)) {
+    // 未登录
+    return false;
+  }
+  // 登录成功
+  return true;
+};
 
 // 检查企业资质
 const checkShowPrice = () => {
-	// 获取登录标识
-	let userInfo = uni.getStorageSync('userInfo');
-	// 如果未登录,不显示
-	if (!userInfo) return false;
-	// 未加好友不显示
-	if (!userInfo.show_price) return false;
-	// 登录成功
-	return true;
-}
+  // 获取登录标识
+  let userInfo = uni.getStorageSync("userInfo");
+  // 如果未登录,不显示
+  if (!userInfo) return false;
+  // 未加好友不显示
+  if (!userInfo.show_price) return false;
+  // 登录成功
+  return true;
+};
 
 // 检查城市ID
 const getCity = () => {
-	// 获取登录标识
-	let userInfo = uni.getStorageSync('userInfo');
-	// 如果不存在的话
-	if (!userInfo) return '';
-	// 资质ID不存在的话
-	if (!userInfo.city_id) return '';
-	// 登录成功
-	return userInfo.city_id;
-}
+  // 获取登录标识
+  let userInfo = uni.getStorageSync("userInfo");
+  // 如果不存在的话
+  if (!userInfo) return "";
+  // 资质ID不存在的话
+  if (!userInfo.city_id) return "";
+  // 登录成功
+  return userInfo.city_id;
+};
 
 // 检查城市ID
-const isManager	= ()=>{
-	// 获取登录标识
-	let userInfo   	= uni.getStorageSync('userInfo');
-	// 如果不存在的话
-	if( !userInfo )	return false;
-	// 资质ID不存在的话
-	if( !userInfo.is_manager ) return false;
-	// 登录成功
-	return 			true;
-}
-
+const isManager = () => {
+  // 获取登录标识
+  let userInfo = uni.getStorageSync("userInfo");
+  // 如果不存在的话
+  if (!userInfo) return false;
+  // 资质ID不存在的话
+  if (!userInfo.is_manager) return false;
+  // 登录成功
+  return true;
+};
 
 // 是否要求填写城市
 const alertCity = () => {
-	// 获取登录标识
-	let userInfo = uni.getStorageSync('userInfo');
-	// 如果不存在的话
-	if (!userInfo || !userInfo.city_id) {
-		// 未登录
-		uni.showModal({
-			title: "请先选择您的城市",
-			success(res) {
-				if (res.confirm) {
-					// 用户点击确定按钮
-					uni.navigateTo({
-						url: "/pages/user/info"
-					})
-				}
-			}
-		});
-		return false;
-	}
-	// 登录成功
-	return true;
-}
-
-
-
-
+  // 获取登录标识
+  let userInfo = uni.getStorageSync("userInfo");
+  // 如果不存在的话
+  if (!userInfo || !userInfo.city_id) {
+    // 未登录
+    uni.showModal({
+      title: "请先选择您的城市",
+      success(res) {
+        if (res.confirm) {
+          // 用户点击确定按钮
+          uni.navigateTo({
+            url: "/pages/user/info",
+          });
+        }
+      },
+    });
+    return false;
+  }
+  // 登录成功
+  return true;
+};
 
 // 检查客服推送码
 const getFollowQrcode = () => {
-	// 获取登录标识
-	let userInfo = uni.getStorageSync('userInfo');
-	// 如果不存在的话
-	if (!userInfo) return '';
-	// 未添加好友
-	if (!userInfo.follow_qrcode) return '';
-	// 返回结果
-	return userInfo.follow_qrcode;
-}
-
+  // 获取登录标识
+  let userInfo = uni.getStorageSync("userInfo");
+  // 如果不存在的话
+  if (!userInfo) return "";
+  // 未添加好友
+  if (!userInfo.follow_qrcode) return "";
+  // 返回结果
+  return userInfo.follow_qrcode;
+};
 
 // 检查客服推送码
 const getFollowLinkUrl = () => {
-	// 获取登录标识
-	let userInfo = uni.getStorageSync('userInfo');
-	// 如果不存在的话
-	if (!userInfo) return '';
-	// 未添加好友
-	if (!userInfo.follow_linkurl) return '';
-	// 返回结果
-	return userInfo.follow_linkurl;
-}
-
-
-export default {checkLogin:checkLogin,alterLogin:alterLogin,checkShowPrice:checkShowPrice,alertCity:alertCity,getFollowQrcode:getFollowQrcode,getFollowLinkUrl:getFollowLinkUrl,getCity:getCity,isManager:isManager}
+  // 获取登录标识
+  let userInfo = uni.getStorageSync("userInfo");
+  // 如果不存在的话
+  if (!userInfo) return "";
+  // 未添加好友
+  if (!userInfo.follow_linkurl) return "";
+  // 返回结果
+  return userInfo.follow_linkurl;
+};
+
+const getHasFollow = () => {
+  // 获取登录标识
+  let userInfo = uni.getStorageSync("userInfo");
+  // 如果不存在的话
+  if (!userInfo) return false;
+  return userInfo.have_follow == 1;
+};
+
+export default {
+  checkLogin: checkLogin,
+  alterLogin: alterLogin,
+  checkShowPrice: checkShowPrice,
+  alertCity: alertCity,
+  getFollowQrcode: getFollowQrcode,
+  getFollowLinkUrl: getFollowLinkUrl,
+  getCity: getCity,
+  isManager: isManager,
+  getHasFollow: getHasFollow,
+};