<output id="qn6qe"></output>

    1. <output id="qn6qe"><tt id="qn6qe"></tt></output>
    2. <strike id="qn6qe"></strike>

      亚洲 日本 欧洲 欧美 视频,日韩中文字幕有码av,一本一道av中文字幕无码,国产线播放免费人成视频播放,人妻少妇偷人无码视频,日夜啪啪一区二区三区,国产尤物精品自在拍视频首页,久热这里只有精品12

      微信小店與微信小程序簡單集成指南

      微信小店現已全面打通小程序生態,為開發者提供強大的電商能力支持。本文將詳細介紹各項集成功能及代碼實現方案。

      一、商品展示與交易能力

      1. 商品卡片嵌入

      // 基礎商品卡片嵌入
      <store-product product-id="123456" app-id="wx1234567890abcdef"></store-product>
      
      // 自定義樣式
      <store-product
        product-id="123456"
        custom-style="{
          card: { 'background-color': '#FAFAFA', 'border-radius': '8px' },
          title: { 'color': '#333', 'font-weight': 'bold' },
          price: { 'color': '#FF6146', 'font-size': '18px' }
        }"
      ></store-product>
      
      
      // uniapp-vue2  tips:使用了小店商品循環
      <!-- #ifdef MP-WEIXIN -->
        <store-product :appid="shop.shop_appid" :product-id="item.product_id" custom-content="true">
          <view class="goods-img">
            <image :src="item.pic" mode="aspectFill" />
          </view>
          <view class="goods-info">
            <view class="goods-name">{{ item.name }}</view>
            <view class="goods-price"><text class="goods-unit">¥</text>{{ item.market_price }}
            </view>
            <text
              class="goods-pprice">預估優惠¥{{ (item.market_price - item.sell_price).toFixed(2) }}</text>
          </view>
        </store-product>
      <!-- #endif -->
      

      示例:img

      2. 半屏下單頁

      點擊購買按鈕自動喚起半屏下單頁:

      // 無需額外代碼,組件內置交互邏輯
      

      3. 優選聯盟帶貨

      // 獲取帶貨商品詳情
      wx.request({
        url: "https://api.weixin.qq.com/channels/ec/product/get",
        data: {
          product_id: "123456",
          access_token: "YOUR_ACCESS_TOKEN",
        },
        success: (res) => {
          const promotionLink = res.data.product_promotion_link;
          // 使用推廣鏈接嵌入商品
          wx.navigateTo({
            url: `/pages/product/detail?promotion_link=${encodeURIComponent(
              promotionLink
            )}`,
          });
        },
      });
      

      二、店鋪運營功能

      1. 店鋪首頁嵌入

      // 在頁面中嵌入小店首頁
      <store-home appid="wx1234567890abcdef"></store-home>
      

      2. 訂單管理

      // 跳轉訂單詳情頁
      wx.openStoreOrderDetail({
        orderId: "ORDER123456789",
        success: (res) => {
          console.log("打開訂單詳情成功");
        },
        fail: (err) => {
          console.error("打開訂單詳情失敗", err);
        },
      });
      

      3. 優惠券

      // 嵌入優惠券組件
      <store-coupon coupon-id="COUPON123" appid="wx1234567890abcdef"></store-coupon>
      

      三、直播與視頻集成

      1. 視頻號直播

      // 獲取直播信息
      wx.getChannelsLiveInfo({
        finderUsername: "finder_name",
        success: (res) => {
          if (res.liveStatus === 1) {
            // 直播中
            wx.openChannelsLive({
              finderUsername: "finder_name",
              feedId: res.feedId,
              nonceId: res.nonceId,
            });
          }
        },
      });
      
      // 預約直播
      wx.reserveChannelsLive({
        finderUsername: "finder_name",
        success: (res) => {
          console.log("預約狀態:", res.state);
        },
      });
      

      2. 視頻號視頻嵌入

      // 嵌入視頻號視頻
      <channel-video
        finder-username="finder_name"
        feed-id="FEED123456"
        video-id="VIDEO123456"
      ></channel-video>;
      
      // 跳轉視頻活動
      wx.openChannelsActivity({
        finderUsername: "finder_name",
        feedId: "FEED123456",
        videoId: "VIDEO123456",
      });
      
      // uniapp-vue2 還可以簡單實現跳轉視頻之后計時進行獎勵發放(省略其他邏輯)
      uni.showModal({
        title: "溫馨提示",
        content: "觀看滿15秒可獲獎勵",
        confirmText: "繼續觀看",
        success(res) {
          if (res.confirm) {
            uni.openChannelsActivity({
              finderUserName: item.sph_id,
              feedId: item.sph_video_id,
              success: (res) => {
                const timestamp = Date.now();
                app.post(
                  "對應接口",
                  {
                    sid: item.sph_id,
                    vid: item.sph_video_id,
                    event: 0,
                    time1: timestamp,
                  },
                  function (result) {
                    const jumpInfo = {
                      sid: item.sph_id,
                      vid: item.sph_video_id,
                      event: 0,
                      timestamp,
                    };
                    uni.setStorageSync("videoJumpInfo", jumpInfo);
                  }
                );
              },
            });
          }
        },
      });
      

      四、多端互通能力

      1. APP 跳轉小店

      // 生成跳轉Scheme
      wx.request({
        url: "https://api.weixin.qq.com/channels/ec/product/scheme/get?access_token=ACCESS_TOKEN",
        method: "POST",
        data: {
          product_id: "324545",
          from_appid: "APPID",
          expire: 100,
        },
        success: (res) => {
          const scheme = res.openlink; // 獲取跳轉鏈接
          // 在APP中使用此scheme跳轉
        },
      });
      

      五、參考鏈接

      還有部分沒貼,可以進官網看對應的實現以及示例

      posted @ 2025-07-03 17:48  幼兒園技術家  閱讀(463)  評論(0)    收藏  舉報
      主站蜘蛛池模板: 一道本AV免费不卡播放| 中文字幕国产精品自拍| 97国产精品人人爽人人做| 国产对白老熟女正在播放| 日韩一区二区三区无码a片| 人妻精品动漫H无码中字| 亚洲精品国产成人| 日韩亚洲精品国产第二页| 亚洲精品国自产拍影院| 国产老熟女国语免费视频| 国产精品一二二区视在线| 色综合热无码热国产| 欧美性白人极品hd| 久久精品亚洲精品国产区| 麻豆国产传媒精品视频| 国产精品国产三级在线专区| 无遮挡午夜男女xx00动态| 人妻少妇456在线视频| 一区二区三区精品偷拍| 国产综合色在线精品| 亚洲欧洲精品一区二区| 成人视频在线观看| 国产精品国产三级在线专区| 亚洲色最新高清AV网站| 阜宁县| 亚洲中文字幕一二区日韩| 国产福利深夜在线观看| 久热这里有精品免费视频| 国产精品一区二区三区污| 久久中文字幕一区二区| 精品国产免费一区二区三区香蕉 | 无码国产偷倩在线播放| 最近免费中文字幕大全免费版视频| 国产午夜福利视频在线| 一区二区在线欧美日韩中文| 日韩精品区一区二区三vr| 国产婷婷精品av在线| 狠狠躁夜夜躁人人爽天天5| 国产线播放免费人成视频播放| 在线观看免费人成视频色9| 色综合天天综合网天天看片|