This commit is contained in:
2026-09-15 10:26:34 +08:00
commit ecf36afa56
10493 changed files with 1404888 additions and 0 deletions
@@ -0,0 +1,80 @@
<?xml version="1.0"?>
<!--
/**
* 2025 D1m Group
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0) that is available
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
*
* @copyright 2025 D1m Group
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
<system>
<tab id="stemcell" translate="label" sortOrder="100">
<label>Stemcell</label>
</tab>
<section id="commerce" translate="label" type="text" sortOrder="100" showInDefault="1" showInWebsite="1" showInStore="1">
<class>separator-top</class>
<label>微信小程序配置</label>
<tab>stemcell</tab>
<resource>Stemcell_Commerce::config</resource>
<group id="wechat" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
<label>微信小程序设置</label>
<field id="app_id" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
<label>AppID</label>
<comment>微信小程序的AppID</comment>
</field>
<field id="app_secret" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1">
<label>AppSecret</label>
<comment>微信小程序的AppSecret</comment>
</field>
<field id="switch" type="select" showInDefault="1" sortOrder="31" showInWebsite="1" showInStore="1">
<label>小程序首页开关</label>
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
<comment>控制小程序首页的搜索、产品中心、技术资源等是否在小程序首页展示</comment>
</field>
<field id="banner" type="textarea" showInDefault="1" sortOrder="32" showInWebsite="1" showInStore="1">
<label>小程序首页banner</label>
<comment>控制小程序首页banner</comment>
</field>
<field id="api_url" translate="label" type="text" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1">
<label>微信API地址</label>
<comment>微信API的基础URL,默认为https://api.weixin.qq.com</comment>
</field>
<field id="utility_tools" type="textarea" showInDefault="1" sortOrder="33" showInWebsite="1" showInStore="1">
<label>实用工具页面配置</label>
</field>
<field id="contact_us" type="textarea" showInDefault="1" sortOrder="33" showInWebsite="1" showInStore="1">
<label>联系我们页面配置</label>
</field>
<field id="technical_resource_menu" type="textarea" showInDefault="1" sortOrder="33" showInWebsite="1" showInStore="1">
<label>技术资源菜单配置</label>
</field>
<field id="marketing_posts" type="textarea" showInDefault="1" sortOrder="33" showInWebsite="1" showInStore="1">
<label>市场活动配置</label>
</field>
<field id="tesr_product_finder" type="textarea" showInDefault="1" sortOrder="33" showInWebsite="1" showInStore="1">
<label>多能干细胞维持培养工具页面配置</label>
</field>
<field id="new_product" type="textarea" showInDefault="1" sortOrder="33" showInWebsite="1" showInStore="1">
<label>新品页面配置</label>
</field>
</group>
</section>
</system>
</config>
+26
View File
@@ -0,0 +1,26 @@
<?xml version="1.0"?>
<!--
/**
* 2025 D1m Group
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0) that is available
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
*
* @copyright 2025 D1m Group
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Store:etc/config.xsd">
<default>
<commerce>
<wechat>
<app_id>wx428b8cd6a51c2ee1</app_id>
<app_secret><![CDATA[]]></app_secret>
<api_url>https://api.weixin.qq.com</api_url>
</wechat>
</commerce>
</default>
</config>
+20
View File
@@ -0,0 +1,20 @@
<?xml version="1.0"?>
<!--
/**
* 2025 D1m Group
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0) that is available
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
*
* @copyright 2025 D1m Group
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<!-- 绑定API接口到实现类 -->
<preference for="Stemcell\Commerce\Api\CustomerManagementInterface"
type="Stemcell\Commerce\Model\CustomerManagement"/>
</config>
+24
View File
@@ -0,0 +1,24 @@
<?xml version="1.0"?>
<!--
/**
* 2025 D1m Group
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0) that is available
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
*
* @copyright 2025 D1m Group
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="Stemcell_Commerce" setup_version="1.0.0">
<sequence>
<module name="Magento_Customer"/>
<module name="Magento_Integration"/>
<module name="Magento_User"/>
</sequence>
</module>
</config>
+112
View File
@@ -0,0 +1,112 @@
<?xml version="1.0"?>
<!--
/**
* 2025 D1m Group
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0) that is available
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
*
* @copyright 2025 D1m Group
* @license http://www.opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
*/
-->
<routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Webapi:etc/webapi.xsd">
<!-- 获取微信小程序openid API -->
<route url="/V1/stemcell-commerce/customer/get-wechat-openid" method="POST">
<service class="Stemcell\Commerce\Api\CustomerManagementInterface" method="getWechatOpenid"/>
<resources>
<resource ref="anonymous"/>
</resources>
</route>
<!-- 微信小程序用户创建API -->
<route url="/V1/stemcell-commerce/customer/login-by-mobile" method="POST">
<service class="Stemcell\Commerce\Api\CustomerManagementInterface" method="loginByMobile"/>
<resources>
<resource ref="anonymous"/>
</resources>
</route>
<!-- 用户登出API -->
<route url="/V1/stemcell-commerce/customer/logout" method="POST">
<service class="Stemcell\Commerce\Api\CustomerManagementInterface" method="logout"/>
<resources>
<resource ref="self"/>
</resources>
</route>
<!-- 获取用户信息API -->
<route url="/V1/stemcell-commerce/customer/get-info" method="GET">
<service class="Stemcell\Commerce\Api\CustomerManagementInterface" method="getCustomerInfo"/>
<resources>
<resource ref="self"/>
</resources>
</route>
<!-- 用户信息修改API -->
<route url="/V1/stemcell-commerce/customer/update-info" method="POST">
<service class="Stemcell\Commerce\Api\CustomerManagementInterface" method="updateCustomerInfo"/>
<resources>
<resource ref="self"/>
</resources>
</route>
<!-- 微信一键登录API -->
<route url="/V1/stemcell-commerce/customer/wechat-login" method="POST">
<service class="Stemcell\Commerce\Api\CustomerManagementInterface" method="wechatLogin"/>
<resources>
<resource ref="anonymous"/>
</resources>
</route>
<route url="/V1/stemcell-commerce/wechat/entrance" method="GET">
<service class="Stemcell\Commerce\Model\Wechat\Config" method="getWechatConfig"/>
<resources>
<resource ref="anonymous"/>
</resources>
</route>
<!-- 实用工具页面配置API -->
<route url="/V1/stemcell-commerce/wechat/utility-tools" method="GET">
<service class="Stemcell\Commerce\Model\Wechat\Config" method="getUtilityTools"/>
<resources>
<resource ref="anonymous"/>
</resources>
</route>
<!-- 联系我们页面配置API -->
<route url="/V1/stemcell-commerce/wechat/contact-us" method="GET">
<service class="Stemcell\Commerce\Model\Wechat\Config" method="getContactUs"/>
<resources>
<resource ref="anonymous"/>
</resources>
</route>
<!-- 技术资源菜单配置API -->
<route url="/V1/stemcell-commerce/wechat/technical-resource-menu" method="GET">
<service class="Stemcell\Commerce\Model\Wechat\Config" method="getTechnicalResourceMenu"/>
<resources>
<resource ref="anonymous"/>
</resources>
</route>
<!-- 市场活动配置API -->
<route url="/V1/stemcell-commerce/wechat/marketing-posts" method="GET">
<service class="Stemcell\Commerce\Model\Wechat\Config" method="getMarketingPosts"/>
<resources>
<resource ref="anonymous"/>
</resources>
</route>
<!-- 新品页面配置API -->
<route url="/V1/stemcell-commerce/wechat/new-product" method="GET">
<service class="Stemcell\Commerce\Model\Wechat\Config" method="getNewProduct"/>
<resources>
<resource ref="anonymous"/>
</resources>
</route>
</routes>