【代码优化】分销相关的注释
parent
2ea027a6e0
commit
f4cc8def91
|
@ -5,7 +5,6 @@ deploy.sh
|
||||||
.hbuilderx/
|
.hbuilderx/
|
||||||
.vscode/
|
.vscode/
|
||||||
**/.DS_Store
|
**/.DS_Store
|
||||||
.env
|
|
||||||
yarn.lock
|
yarn.lock
|
||||||
package-lock.json
|
package-lock.json
|
||||||
*.keystore
|
*.keystore
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
/>
|
/>
|
||||||
</button>
|
</button>
|
||||||
</view>
|
</view>
|
||||||
<view class="ss-flex" @tap="sheep.$router.go('/pages/user/wallet/commission')">
|
<view class="ss-flex" @tap="sheep.$router.go('/pages/commission/wallet')">
|
||||||
<view class="header-title ss-m-r-4">查看明细</view>
|
<view class="header-title ss-m-r-4">查看明细</view>
|
||||||
<text class="cicon-play-arrow" />
|
<text class="cicon-play-arrow" />
|
||||||
</view>
|
</view>
|
||||||
|
|
|
@ -18,6 +18,7 @@ export default {
|
||||||
}),
|
}),
|
||||||
|
|
||||||
// 获取微信小程序码
|
// 获取微信小程序码
|
||||||
|
// TODO @puhui999:这个接口,挪到 /Users/yunai/Java/yudao-mall-uniapp/sheep/api/member/social.js
|
||||||
getWxacode: async (path, query) => {
|
getWxacode: async (path, query) => {
|
||||||
return await request({
|
return await request({
|
||||||
url: '/member/social-user/wxa-qrcode',
|
url: '/member/social-user/wxa-qrcode',
|
||||||
|
|
|
@ -65,7 +65,12 @@ const getShareInfo = (
|
||||||
return shareInfo;
|
return shareInfo;
|
||||||
};
|
};
|
||||||
|
|
||||||
// 构造spm分享参数
|
/**
|
||||||
|
* 构造 spm 分享参数
|
||||||
|
*
|
||||||
|
* @param params json 格式,其中包含:1)shareId 分享用户的编号;2)page 页面类型;3)query 页面 ID(参数);4)platform 平台类型;5)from 分享来源类型。
|
||||||
|
* @return 分享串 `spm=${shareId}.${page}.${query}.${platform}.${from}`
|
||||||
|
*/
|
||||||
const buildSpmQuery = (params) => {
|
const buildSpmQuery = (params) => {
|
||||||
const user = $store('user');
|
const user = $store('user');
|
||||||
let shareId = '0'; // 设置分享者用户ID
|
let shareId = '0'; // 设置分享者用户ID
|
||||||
|
@ -87,7 +92,7 @@ const buildSpmQuery = (params) => {
|
||||||
if (typeof params.from !== 'undefined') {
|
if (typeof params.from !== 'undefined') {
|
||||||
from = platformMap.indexOf(params.from) + 1;
|
from = platformMap.indexOf(params.from) + 1;
|
||||||
}
|
}
|
||||||
//spmParams = ... 可按需扩展
|
// spmParams = ... 可按需扩展
|
||||||
return `spm=${shareId}.${page}.${query}.${platform}.${from}`;
|
return `spm=${shareId}.${page}.${query}.${platform}.${from}`;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,6 @@ const app = defineStore({
|
||||||
},
|
},
|
||||||
bind_mobile: 0, // 登陆后绑定手机号提醒 (弱提醒,可手动关闭)
|
bind_mobile: 0, // 登陆后绑定手机号提醒 (弱提醒,可手动关闭)
|
||||||
},
|
},
|
||||||
chat: {},
|
|
||||||
template: {
|
template: {
|
||||||
// 店铺装修模板
|
// 店铺装修模板
|
||||||
basic: {}, // 基本信息
|
basic: {}, // 基本信息
|
||||||
|
@ -73,7 +72,7 @@ const app = defineStore({
|
||||||
this.platform = {
|
this.platform = {
|
||||||
share: {
|
share: {
|
||||||
methods: ["poster", "link"],
|
methods: ["poster", "link"],
|
||||||
linkAddress: "https://shopro.sheepjs.com/#/",
|
linkAddress: "http://127.0.0.1:3000", // TODO 芋艿:可以考虑改到 .env 那
|
||||||
posterInfo: {
|
posterInfo: {
|
||||||
"user_bg": "/static/img/shop/config/user-poster-bg.png",
|
"user_bg": "/static/img/shop/config/user-poster-bg.png",
|
||||||
"goods_bg": "/static/img/shop/config/goods-poster-bg.png",
|
"goods_bg": "/static/img/shop/config/goods-poster-bg.png",
|
||||||
|
@ -82,10 +81,6 @@ const app = defineStore({
|
||||||
},
|
},
|
||||||
bind_mobile: 0
|
bind_mobile: 0
|
||||||
};
|
};
|
||||||
this.chat = {
|
|
||||||
chat_domain: "https://api.shopro.sheepjs.com/chat",
|
|
||||||
room_id: "admin"
|
|
||||||
}
|
|
||||||
this.has_wechat_trade_managed = 0;
|
this.has_wechat_trade_managed = 0;
|
||||||
|
|
||||||
// 加载主题
|
// 加载主题
|
||||||
|
|
|
@ -80,15 +80,6 @@ const user = defineStore({
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
// 添加分享记录
|
|
||||||
// TODO 芋艿:整理下;
|
|
||||||
// async addShareLog(params) {
|
|
||||||
// const {
|
|
||||||
// error
|
|
||||||
// } = await userApi.addShareLog(params);
|
|
||||||
// if (error === 0) uni.removeStorageSync('shareLog');
|
|
||||||
// },
|
|
||||||
|
|
||||||
// 设置 token
|
// 设置 token
|
||||||
setToken(token = '', refreshToken = '') {
|
setToken(token = '', refreshToken = '') {
|
||||||
if (token === '') {
|
if (token === '') {
|
||||||
|
@ -153,14 +144,6 @@ const user = defineStore({
|
||||||
|
|
||||||
// 绑定推广员
|
// 绑定推广员
|
||||||
$share.bindBrokerageUser()
|
$share.bindBrokerageUser()
|
||||||
// 添加分享记录
|
|
||||||
// TODO 芋艿:整理下;
|
|
||||||
// const shareLog = uni.getStorageSync('shareLog');
|
|
||||||
// if (!isEmpty(shareLog)) {
|
|
||||||
// this.addShareLog({
|
|
||||||
// ...shareLog,
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// 登出系统
|
// 登出系统
|
||||||
|
|
Loading…
Reference in New Issue