Compare commits

...

8 Commits

Author SHA1 Message Date
芋道源码 75eed2ba19
!178 refactor(store): 优化 Pinia store 定义方式
Merge pull request !178 from 爱宇阳/master
2026-05-23 09:30:01 +00:00
芋道源码 9e7ef1e9f1
!179 update pages/commission/promoter.vue.
Merge pull request !179 from 爱宇阳/N/A
2026-05-23 09:06:14 +00:00
芋道源码 3a27171cda
!180 chore(s-layout): 支持定义顶部导航栏背景颜色
Merge pull request !180 from 背起行囊/master
2026-05-23 08:59:46 +00:00
zhangfengchen 014b0dd508 chore(s-layout): 支持定义顶部导航栏背景颜色 2026-05-21 14:46:49 +08:00
爱宇阳 c034b59a7b
update pages/commission/promoter.vue.
修复getList()未定义错误

Signed-off-by: 爱宇阳 <thedanyang@qq.com>
2026-05-13 03:42:48 +00:00
YunaiV 0533985189 (〃'▽'〃)_v2026_04_发布:新增代码生成器 Excel 导入,增强 IoT 场景联动与数据流转 2026-05-10 11:01:21 +08:00
aiyvyang 43d2d02e8e refactor(store): 优化 Pinia store 定义方式
将所有 store 模块从旧版 defineStore({ id: 'xxx', ... }) 形式
改为新版 defineStore('xxx', { ... }) 形式,符合 Pinia 推荐的最佳实践。

涉及模块:
  - app.js
  - cart.js
  - modal.js
  - sys.js
  - user.js
2026-05-09 15:36:10 +08:00
YunaiV b6b0ca3dbd fix: 修复 H5 公众号微信 JSSDK 签名 URL 错用 location.origin 导致 wx.config invalid signature,改用 location.href.split('#')[0] 2026-05-02 23:20:49 +08:00
10 changed files with 26 additions and 20 deletions

View File

@ -2,7 +2,7 @@
"name": "芋道商城", "name": "芋道商城",
"appid": "__UNI__460BC4C", "appid": "__UNI__460BC4C",
"description": "基于 uni-app + Vue3 技术驱动的在线商城系统,内含诸多功能与丰富的活动,期待您的使用和反馈。", "description": "基于 uni-app + Vue3 技术驱动的在线商城系统,内含诸多功能与丰富的活动,期待您的使用和反馈。",
"versionName": "2026.03", "versionName": "2026.04",
"versionCode": "183", "versionCode": "183",
"transformPx": false, "transformPx": false,
"app-plus": { "app-plus": {

View File

@ -2,7 +2,7 @@
"id": "shopro", "id": "shopro",
"name": "shopro", "name": "shopro",
"displayName": "芋道商城", "displayName": "芋道商城",
"version": "2026.03", "version": "2026.04",
"description": "芋道商城一套代码同时发行到iOS、Android、H5、微信小程序多个平台请使用手机扫码快速体验强大功能", "description": "芋道商城一套代码同时发行到iOS、Android、H5、微信小程序多个平台请使用手机扫码快速体验强大功能",
"scripts": { "scripts": {
"prettier": "prettier --write \"{pages,sheep}/**/*.{js,json,tsx,css,less,scss,vue,html,md}\"" "prettier": "prettier --write \"{pages,sheep}/**/*.{js,json,tsx,css,less,scss,vue,html,md}\""

View File

@ -105,7 +105,7 @@
return; return;
} }
state.pagination.pageNo++; state.pagination.pageNo++;
getList(); getRankList();
} }
// //

View File

@ -12,6 +12,7 @@
:color="color" :color="color"
:tools="tools" :tools="tools"
:opacityBgUi="opacityBgUi" :opacityBgUi="opacityBgUi"
:backgroundColor="navbarBackgroundColor"
@search="(e) => emits('search', e)" @search="(e) => emits('search', e)"
:defaultSearch="defaultSearch" :defaultSearch="defaultSearch"
/> />
@ -80,6 +81,11 @@
type: String, type: String,
default: 'bg-white', default: 'bg-white',
}, },
// navbar === 'normal'
navbarBackgroundColor: {
type: String,
default: '',
},
color: { color: {
type: String, type: String,
default: '', default: '',
@ -216,13 +222,13 @@
onMounted(() => { onMounted(() => {
// #ifdef MP-ALIPAY // #ifdef MP-ALIPAY
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: "", title: '',
}); });
// #endif // #endif
if (!isEmpty(shareInfo.value)) { if (!isEmpty(shareInfo.value)) {
sheep.$platform.share.updateShareInfo(shareInfo.value); sheep.$platform.share.updateShareInfo(shareInfo.value);
} }
}) });
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@ -30,8 +30,9 @@ export default {
} }
// 调用后端接口,获得 JSSDK 初始化所需的签名 // 调用后端接口,获得 JSSDK 初始化所需的签名
const url = location.origin; // 微信要求签名 URL 与当前页面去掉 hash 后完全一致;不能直接用 location.origin会丢子路径与 query
const { code, data } = await AuthUtil.createWeixinMpJsapiSignature(url); const signUrl = location.href.split('#')[0];
const { code, data } = await AuthUtil.createWeixinMpJsapiSignature(signUrl);
if (code === 0) { if (code === 0) {
jweixin.config({ jweixin.config({
debug: false, debug: false,
@ -57,7 +58,11 @@ export default {
configSuccess = true; configSuccess = true;
jweixin.error((err) => { jweixin.error((err) => {
configSuccess = false; configSuccess = false;
console.error('微信 JSSDK 初始化失败', err); console.error('[wx-jssdk] config error', err, {
href: location.href,
signUrl,
data,
});
$helper.toast('微信JSSDK:' + err.errMsg); $helper.toast('微信JSSDK:' + err.errMsg);
}); });
jweixin.ready(() => { jweixin.ready(() => {

View File

@ -8,8 +8,7 @@ import user from './user';
import sys from './sys'; import sys from './sys';
import { baseUrl, h5Url } from '@/sheep/config'; import { baseUrl, h5Url } from '@/sheep/config';
const app = defineStore({ const app = defineStore('app', {
id: 'app',
state: () => ({ state: () => ({
paramsForTabbar: {}, // 为全局tabbar跳转传参用。原因是 tabbar 无法传参,只能通过全局状态传递 paramsForTabbar: {}, // 为全局tabbar跳转传参用。原因是 tabbar 无法传参,只能通过全局状态传递
info: { info: {
@ -74,7 +73,7 @@ const app = defineStore({
this.info = { this.info = {
name: '芋道商城', name: '芋道商城',
logo: 'https://static.iocoder.cn/ruoyi-vue-pro-logo.png', logo: 'https://static.iocoder.cn/ruoyi-vue-pro-logo.png',
version: '2026.03', version: '2026.04',
copyright: '全部开源,个人与企业可 100% 免费使用', copyright: '全部开源,个人与企业可 100% 免费使用',
copytime: 'Copyright© 2018-2025', copytime: 'Copyright© 2018-2025',

View File

@ -1,8 +1,7 @@
import { defineStore } from 'pinia'; import { defineStore } from 'pinia';
import CartApi from '@/sheep/api/trade/cart'; import CartApi from '@/sheep/api/trade/cart';
const cart = defineStore({ const cart = defineStore('cart', {
id: 'cart',
state: () => ({ state: () => ({
list: [], // 购物车列表invalidList + validList list: [], // 购物车列表invalidList + validList
selectedIds: [], // 已选列表 selectedIds: [], // 已选列表

View File

@ -1,7 +1,6 @@
import { defineStore } from 'pinia'; import { defineStore } from 'pinia';
const modal = defineStore({ const modal = defineStore('modal', {
id: 'modal',
state: () => ({ state: () => ({
auth: '', // 授权弹框 accountLogin|smsLogin|resetPassword|changeMobile|changePassword|changeUsername auth: '', // 授权弹框 accountLogin|smsLogin|resetPassword|changeMobile|changePassword|changeUsername
share: false, // 分享弹框 share: false, // 分享弹框

View File

@ -1,8 +1,7 @@
import { defineStore } from 'pinia'; import { defineStore } from 'pinia';
import app from './app'; import app from './app';
const sys = defineStore({ const sys = defineStore('sys', {
id: 'sys',
state: () => ({ state: () => ({
theme: '', // 主题, theme: '', // 主题,
mode: 'light', // 明亮模式、暗黑模式(暂未支持) mode: 'light', // 明亮模式、暗黑模式(暂未支持)

View File

@ -36,8 +36,7 @@ const defaultNumData = {
}, },
}; };
const user = defineStore({ const user = defineStore('user', {
id: 'user',
state: () => ({ state: () => ({
userInfo: clone(defaultUserInfo), // 用户信息 userInfo: clone(defaultUserInfo), // 用户信息
userWallet: clone(defaultUserWallet), // 用户钱包信息 userWallet: clone(defaultUserWallet), // 用户钱包信息