From 5a769016c69d9cfd6be52a5e60ec53be0f1ba9c1 Mon Sep 17 00:00:00 2001
From: "DESKTOP-GMUNQ1B\\k" <1154079537@qq.com>
Date: Sat, 2 Mar 2024 11:47:03 +0800
Subject: [PATCH] =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E4=B8=AD=E5=BF=83=20=20?=
=?UTF-8?q?=E8=AE=BE=E7=BD=AE=E5=8A=9F=E8=83=BD=E6=90=AC=E8=BF=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
api/cloud_warehouse.js | 29 +
api/user.js | 66 +-
components/emptyPage.vue | 25 +-
pages.json | 220 ++--
.../big_classification/index.vue | 98 +-
.../small_classification/index.vue | 273 ++--
pages/helpPeople/formTable.vue | 168 +--
pages/helpPeople/formTable_green.vue | 1118 +++++++++++++++++
pages/helpPeople/helpPeople.vue | 33 +-
pages/helpPeople/helpPeople_green.vue | 96 ++
pages/index/component/shopList.vue | 558 ++++----
pages/rich/mp4.vue | 124 ++
pages/rich/rich.vue | 129 ++
pages/users/invite_code/index.vue | 20 +-
pages/users/user_info/index.vue | 270 +++-
15 files changed, 2546 insertions(+), 681 deletions(-)
create mode 100644 api/cloud_warehouse.js
create mode 100644 pages/helpPeople/formTable_green.vue
create mode 100644 pages/helpPeople/helpPeople_green.vue
create mode 100644 pages/rich/mp4.vue
create mode 100644 pages/rich/rich.vue
diff --git a/api/cloud_warehouse.js b/api/cloud_warehouse.js
new file mode 100644
index 0000000..f3726de
--- /dev/null
+++ b/api/cloud_warehouse.js
@@ -0,0 +1,29 @@
+import request from "@/utils/request.js";
+
+/**
+ * 获取里海云仓大分类
+ * @param
+ */
+export function getCategory(id, pid) {
+ let par = {};
+ if (pid) {
+ par['pid'] = pid;
+ }
+ return request.get("store/merchant/category/lst/" + id, par);
+}
+
+/**
+ * 获取里海云仓比例
+ * @param
+ */
+export function getProportion(data) {
+ return request.get("product/spu/storeLabel", data);
+}
+
+/**
+ * 里海云仓商品列表
+ * @param
+ */
+export function goodsList(data) {
+ return request.get("product/spu/merchant/" + data.mer_id, data);
+}
\ No newline at end of file
diff --git a/api/user.js b/api/user.js
index 4abb9e2..9c10e99 100644
--- a/api/user.js
+++ b/api/user.js
@@ -21,12 +21,12 @@ export function getUserInfo() {
*
*/
export function editAvatar(data) {
- return request.post('user/change/info',data);
+ return request.post('user/change/info', data);
}
// 修改昵称
export function updateInfo(data) {
- return request.post('user/change/avatar',data);
+ return request.post('user/change/avatar', data);
}
/**
* h5用户登录
@@ -114,7 +114,9 @@ export function registerForget(data) {
*
*/
export function getMenuList() {
- return request.get("common/menus",{},{noAuth: true});
+ return request.get("common/menus", {}, {
+ noAuth: true
+ });
}
/*
* 签到用户信息
@@ -358,7 +360,8 @@ export function getRechargeApi() {
* 登陆记录
*/
export function setVisit(data) {
- return request.post('user/set_visit', { ...data
+ return request.post('user/set_visit', {
+ ...data
}, {
noAuth: true
});
@@ -379,7 +382,7 @@ export function serviceLogin(key, data) {
* 客服获取客户列表
*/
export function serviceUserList(mer_id, data) {
- return request.get("service/user_list/"+mer_id, data);
+ return request.get("service/user_list/" + mer_id, data);
}
/**
* 用户获取聊天记录详情
@@ -413,7 +416,8 @@ export function feedbackType() {
* 提交反馈
*/
export function feedback(data) {
- return request.post("user/feedback", { ...data
+ return request.post("user/feedback", {
+ ...data
});
}
/**
@@ -519,7 +523,9 @@ export function imgToBase(data) {
*
*/
export function getAgreementApi(key) {
- return request.get('agreement/'+key,{},{noAuth: true});
+ return request.get('agreement/' + key, {}, {
+ noAuth: true
+ });
}
/**
* 获取协议
@@ -591,7 +597,9 @@ export function growthValueRecord(data) {
*
*/
export function cacheLst() {
- return request.get('agreement_lst',{}, {noAuth: true})
+ return request.get('agreement_lst', {}, {
+ noAuth: true
+ })
}
/**
* 协议规则列表对应的数据
@@ -599,7 +607,9 @@ export function cacheLst() {
*
*/
export function cacheInfo(key) {
- return request.get(`agreement/${key}`,{}, {noAuth: true})
+ return request.get(`agreement/${key}`, {}, {
+ noAuth: true
+ })
}
/**
* 注销账户
@@ -623,7 +633,9 @@ export function serviceUser(merId, uid) {
*
*/
export function serviceSaveMark(merId, uid, mark) {
- return request.post(`service/mark/${merId}/${uid}`, {mark})
+ return request.post(`service/mark/${merId}/${uid}`, {
+ mark
+ })
}
/**
* 获取会员卡类型
@@ -647,7 +659,9 @@ export function memberCardCreate(id, data) {
*
*/
export function memberEquity() {
- return request.get(`svip/user_info`, {}, {noAuth: true})
+ return request.get(`svip/user_info`, {}, {
+ noAuth: true
+ })
}
/**
* 付费会员优惠券
@@ -655,7 +669,9 @@ export function memberEquity() {
*
*/
export function memberCouponLst() {
- return request.get(`svip/coupon_lst`, {}, {noAuth: true})
+ return request.get(`svip/coupon_lst`, {}, {
+ noAuth: true
+ })
}
/**
* 付费会员优惠券--领取
@@ -671,7 +687,9 @@ export function receiveMemberCoupon(id) {
*
*/
export function groomList(data) {
- return request.get(`svip/product_lst`, data, {noAuth: true})
+ return request.get(`svip/product_lst`, data, {
+ noAuth: true
+ })
}
/**
* 客服聊天--撤回消息
@@ -711,7 +729,7 @@ export function getUserSetting() {
*
*/
export function userSettingEdit(data) {
- return request.post(`user/fields/save`, data)
+ return request.post(`user/fields/save`, data)
}
/**
* 报名活动--详情
@@ -719,14 +737,16 @@ export function userSettingEdit(data) {
*
*/
export function registrateDetail(id) {
- return request.get(`system/form/detail/${id}`,{}, {noAuth: true})
+ return request.get(`system/form/detail/${id}`, {}, {
+ noAuth: true
+ })
}
/**
* 报名活动--提交数据
* @param object data
*
*/
-export function registrateCreate(id,data) {
+export function registrateCreate(id, data) {
return request.post(`user/form/create/${id}`, data)
}
/**
@@ -735,7 +755,9 @@ export function registrateCreate(id,data) {
*
*/
export function getRechargeList(data) {
- return request.get(`system/form/lst`, data, {noAuth: true})
+ return request.get(`system/form/lst`, data, {
+ noAuth: true
+ })
}
/**
* 报名活动--记录
@@ -767,5 +789,13 @@ export function registrateRecordDetail(id) {
*
*/
export function systemFormData(id) {
- return request.get(`system/form/info/${id}`, {}, {noAuth: true})
+ return request.get(`system/form/info/${id}`, {}, {
+ noAuth: true
+ })
+}
+
+
+//填写邀请码
+export function bindPromotionCode(data) {
+ return request.post(`user/change/bind_promotion_code`, data)
}
\ No newline at end of file
diff --git a/components/emptyPage.vue b/components/emptyPage.vue
index 854ccad..29e3463 100644
--- a/components/emptyPage.vue
+++ b/components/emptyPage.vue
@@ -1,7 +1,7 @@
-
+
- {{title}}
+ {{title}}
@@ -15,31 +15,40 @@
// +----------------------------------------------------------------------
// | Author: CRMEB Team
// +----------------------------------------------------------------------
- export default{
+ export default {
props: {
title: {
type: String,
default: '暂无记录',
},
+ color: {
+ type: String,
+ default: "#999"
+ },
+ mt: {
+ type: String,
+ default: "200rpx"
+ }
},
}
-
+
\ No newline at end of file
diff --git a/pages.json b/pages.json
index 02e1dd0..d2cf50e 100644
--- a/pages.json
+++ b/pages.json
@@ -145,95 +145,99 @@
"navigationStyle": "custom",
"onReachBottomDistance": 300
}
+ }, {
+ "path": "pages/rich/rich",
+ "style": {
+ "navigationBarTitleText": "政策答疑",
+ "enablePullDownRefresh": false
+ }
},
- {
- "path" : "pages/redpacket/redpacket",
- "style" :
- {
- "navigationBarTitleText" : "补贴",
- "enablePullDownRefresh" : false
- }
- },
- {
- "path" : "pages/redpacket/redpack_type",
- "style" :
- {
- "navigationBarTitleText" : "补贴余额",
- "enablePullDownRefresh": false,
- "navigationStyle": "custom",
- "onReachBottomDistance": 300
- }
- },
- {
- "path" : "pages/newActivity/subsidy/subsidy2",
- "style" :
- {
- "navigationBarTitleText" : "实物通用补贴",
- "enablePullDownRefresh": false,
- "navigationStyle": "custom",
- "onReachBottomDistance": 300
- }
- },
- {
- "path" : "pages/newActivity/subsidy/subsidy3",
- "style" :
- {
- "navigationBarTitleText" : "现金抵扣补贴",
- "enablePullDownRefresh": false,
- "navigationStyle": "custom",
- "onReachBottomDistance": 300
- }
- },
- {
- "path" : "pages/newActivity/towPrice/towPrice",
- "style" :
- {
- "navigationBarTitleText" : "两元专区",
- "enablePullDownRefresh": false,
- "navigationStyle": "custom",
- "onReachBottomDistance": 300
- }
- },
- {
- "path" : "pages/newActivity/giftBag/giftBag",
- "style" :
- {
- "navigationBarTitleText" : "新人礼包",
- "enablePullDownRefresh": false,
- "navigationStyle": "custom",
- "onReachBottomDistance": 300
- }
- },
- {
- "path" : "pages/newActivity/activityDetail/activityDetail",
- "style" :
- {
- "navigationBarTitleText": "活动",
- "enablePullDownRefresh": true,
- "navigationStyle": "custom",
- "onReachBottomDistance": 300
- }
- },
- {
- "path" : "pages/newActivity/subsidy/subsidy",
- "style" :
- {
- "navigationBarTitleText": "补贴记录",
- "enablePullDownRefresh": true,
- "navigationStyle": "custom",
- "onReachBottomDistance": 300
- }
- },
- {
- "path" : "pages/newActivity/invitation/invitation",
- "style" :
- {
- "navigationBarTitleText": "拉新活动",
- "enablePullDownRefresh": true,
- "navigationStyle": "custom",
- "onReachBottomDistance": 300
- }
- }
+ {
+ "path": "pages/rich/mp4",
+ "style": {
+ "navigationBarTitleText": "教学视频",
+ "enablePullDownRefresh": false
+ }
+ },
+ {
+ "path": "pages/redpacket/redpacket",
+ "style": {
+ "navigationBarTitleText": "补贴",
+ "enablePullDownRefresh": false
+ }
+ },
+ {
+ "path": "pages/redpacket/redpack_type",
+ "style": {
+ "navigationBarTitleText": "补贴余额",
+ "enablePullDownRefresh": false,
+ "navigationStyle": "custom",
+ "onReachBottomDistance": 300
+ }
+ },
+ {
+ "path": "pages/newActivity/subsidy/subsidy2",
+ "style": {
+ "navigationBarTitleText": "实物通用补贴",
+ "enablePullDownRefresh": false,
+ "navigationStyle": "custom",
+ "onReachBottomDistance": 300
+ }
+ },
+ {
+ "path": "pages/newActivity/subsidy/subsidy3",
+ "style": {
+ "navigationBarTitleText": "现金抵扣补贴",
+ "enablePullDownRefresh": false,
+ "navigationStyle": "custom",
+ "onReachBottomDistance": 300
+ }
+ },
+ {
+ "path": "pages/newActivity/towPrice/towPrice",
+ "style": {
+ "navigationBarTitleText": "两元专区",
+ "enablePullDownRefresh": false,
+ "navigationStyle": "custom",
+ "onReachBottomDistance": 300
+ }
+ },
+ {
+ "path": "pages/newActivity/giftBag/giftBag",
+ "style": {
+ "navigationBarTitleText": "新人礼包",
+ "enablePullDownRefresh": false,
+ "navigationStyle": "custom",
+ "onReachBottomDistance": 300
+ }
+ },
+ {
+ "path": "pages/newActivity/activityDetail/activityDetail",
+ "style": {
+ "navigationBarTitleText": "活动",
+ "enablePullDownRefresh": true,
+ "navigationStyle": "custom",
+ "onReachBottomDistance": 300
+ }
+ },
+ {
+ "path": "pages/newActivity/subsidy/subsidy",
+ "style": {
+ "navigationBarTitleText": "补贴记录",
+ "enablePullDownRefresh": true,
+ "navigationStyle": "custom",
+ "onReachBottomDistance": 300
+ }
+ },
+ {
+ "path": "pages/newActivity/invitation/invitation",
+ "style": {
+ "navigationBarTitleText": "拉新活动",
+ "enablePullDownRefresh": true,
+ "navigationStyle": "custom",
+ "onReachBottomDistance": 300
+ }
+ }
],
"subPackages": [{
"root": "pages/cloud_warehouse",
@@ -531,12 +535,12 @@
"navigationBarTitleText": "申请退货"
}
},
- {
- "path": "invite_code/index",
- "style": {
- "navigationBarTitleText": "邀请码"
- }
- },
+ {
+ "path": "invite_code/index",
+ "style": {
+ "navigationBarTitleText": "邀请码"
+ }
+ },
{
"path": "login/login_copy",
"style": {
@@ -727,14 +731,14 @@
"style": {
"navigationBarTitleText": "商家入驻"
}
- },
- {
- "path": "settled/unit",
- "style": {
- "navigationBarTitleText": "种养殖户入驻"
- }
- },
- {
+ },
+ {
+ "path": "settled/unit",
+ "style": {
+ "navigationBarTitleText": "种养殖户入驻"
+ }
+ },
+ {
"path": "applicationRecord/index",
"style": {
"navigationBarTitleText": "申请记录"
@@ -1459,12 +1463,12 @@
// "selectedIconPath": "static/images/5-002.png",
// "text": "逛逛"
// },
- {
- "pagePath": "pages/gather/gather",
- "iconPath": "static/images/2-001.png",
- "selectedIconPath": "static/images/2-002.png",
- "text": "工作台"
- },
+ {
+ "pagePath": "pages/gather/gather",
+ "iconPath": "static/images/2-001.png",
+ "selectedIconPath": "static/images/2-002.png",
+ "text": "工作台"
+ },
{
"pagePath": "pages/order_addcart/order_addcart",
"iconPath": "static/images/3-001.png",
diff --git a/pages/cloud_warehouse/big_classification/index.vue b/pages/cloud_warehouse/big_classification/index.vue
index 9870eb9..d99dc54 100644
--- a/pages/cloud_warehouse/big_classification/index.vue
+++ b/pages/cloud_warehouse/big_classification/index.vue
@@ -5,30 +5,65 @@
-
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+ 暂无更多分类~
-
+
\ No newline at end of file
diff --git a/pages/helpPeople/helpPeople.vue b/pages/helpPeople/helpPeople.vue
index 836f6a4..bcebee6 100644
--- a/pages/helpPeople/helpPeople.vue
+++ b/pages/helpPeople/helpPeople.vue
@@ -3,17 +3,16 @@
-
-
+
我是居民用户
-
+
我是农民用户
@@ -23,11 +22,6 @@
\ No newline at end of file
diff --git a/pages/index/component/shopList.vue b/pages/index/component/shopList.vue
index d75c30a..ecfaa10 100644
--- a/pages/index/component/shopList.vue
+++ b/pages/index/component/shopList.vue
@@ -6,29 +6,30 @@
-
-
+
+
{{ item.mer_name }}
- {{ item.type_name }}
- 自营
+ {{ item.type_name }}
+ 自营
-
+
-
-
+
+
+
{{itemn.store_name}}
¥
@@ -40,275 +41,318 @@
-
+
-
+
更多店铺
-
+
+
\ No newline at end of file
diff --git a/pages/rich/mp4.vue b/pages/rich/mp4.vue
new file mode 100644
index 0000000..cb3c1ea
--- /dev/null
+++ b/pages/rich/mp4.vue
@@ -0,0 +1,124 @@
+
+
+
+
+
+
+
+
+
+ {{item.title}}
+
+
+
+ 展开
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/rich/rich.vue b/pages/rich/rich.vue
new file mode 100644
index 0000000..dbb8644
--- /dev/null
+++ b/pages/rich/rich.vue
@@ -0,0 +1,129 @@
+
+
+
+
+
+
+
+
+
+ {{item.title}}
+
+
+
+ 展开
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/users/invite_code/index.vue b/pages/users/invite_code/index.vue
index 737d0d8..ec0e47e 100644
--- a/pages/users/invite_code/index.vue
+++ b/pages/users/invite_code/index.vue
@@ -40,7 +40,7 @@
-
+
@@ -67,7 +67,7 @@
loadTitle: '加载更多',
isAuto: false, //没有授权的不会自动授权
isShowAuth: false, //是否隐藏授权
- uid:''
+ uid: ''
}
},
onLoad() {
@@ -81,7 +81,7 @@
onReachBottom: function() {
this.getList();
},
-
+
methods: {
// 获取二维码
getQrcode() {
@@ -113,15 +113,15 @@
that.loadTitle = '加载更多';
})
},
-
+
getUserInfo() {
let userInfo = this.$Cache.get("USER_INFO");
- if(userInfo){
+ if (userInfo) {
userInfo = JSON.parse(userInfo);
this.uid = userInfo.uid;
}
},
-
+
handleSavePic() {
// 获取要保存的图片路径或URL
let imageUrl = this.qrcodeUrl; // 这里使用了网络上的图片作为示例
@@ -136,7 +136,7 @@
// #endif
// #ifndef H5
- let that =this;
+ let that = this;
uni.downloadFile({
url: imageUrl,
success(res) {
@@ -273,9 +273,9 @@
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #2E2E2E;
- white-space:nowrap;
- overflow:hidden;
- text-overflow:ellipsis;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
}
.red {
diff --git a/pages/users/user_info/index.vue b/pages/users/user_info/index.vue
index 6b7fbfe..3bc048e 100644
--- a/pages/users/user_info/index.vue
+++ b/pages/users/user_info/index.vue
@@ -4,20 +4,22 @@
管理我的账号
-
+
+ :style="{ 'background-image': `url(${item.uid == userInfo.uid ? domain+'/static/diy/currentAcc'+keyColor+'.png' : '' })` }"
+ v-for="(item,index) in switchUserInfo" :key="index">
-
+
-
-
+
{{ item.nickname }}
-
-
+
+
当前账号
-
+
使用账号
-
+
头像
-
+
@@ -69,10 +74,12 @@
手机号码
-
+
点击绑定手机号
-
+
{{userInfo.phone}}
@@ -84,23 +91,42 @@
+
+ 填写邀请码
+
+
+
+
+
+
+
+
地址管理
-
+
立即前往
发票管理
-
+
立即前往
详细信息
-
+
立即前往
@@ -112,21 +138,24 @@
+
-
+
当前版本
+
- 退出登录
+ 退出登录
+
退出登录
-
+
@@ -148,19 +177,32 @@
getLogout,
userAcc,
editAvatar,
- updateInfo
+ updateInfo,
+ bindPromotionCode
} from '@/api/user.js';
- import { switchH5Login, getAppVersion } from '@/api/api.js';
- import { mapGetters } from "vuex";
- import { configMap } from '@/utils';
+ import {
+ switchH5Login,
+ getAppVersion
+ } from '@/api/api.js';
+ import {
+ mapGetters
+ } from "vuex";
+ import {
+ configMap
+ } from '@/utils';
import dayjs from "@/plugin/dayjs/dayjs.min.js";
import Cache from '@/utils/cache';
- import { HTTP_REQUEST_URL } from '@/config/app';
- import { toLogin } from '@/libs/login.js';
+ import {
+ HTTP_REQUEST_URL
+ } from '@/config/app';
+ import {
+ toLogin
+ } from '@/libs/login.js';
export default {
components: {},
data() {
return {
+ promotion_code: '', //邀请码
domain: HTTP_REQUEST_URL,
userInfo: {},
loginType: 'h5',
@@ -171,7 +213,9 @@
version: ''
};
},
- computed: configMap({open_update_info: 0} ,mapGetters(['isLogin','viewColor','keyColor'])),
+ computed: configMap({
+ open_update_info: 0
+ }, mapGetters(['isLogin', 'viewColor', 'keyColor'])),
onLoad() {
if (this.isLogin) {
this.getUserInfo();
@@ -182,7 +226,7 @@
this.appVersionConfig()
//#endif
},
- methods: {
+ methods: {
toggle(type) {
this.type = type
// open 方法传入参数 等同在 uni-popup 组件上绑定 type属性
@@ -194,7 +238,7 @@
*/
uploadpic: function() {
let that = this;
- if(that.open_update_info == 0){
+ if (that.open_update_info == 0) {
return;
}
that.$util.uploadImageOne('upload/image', function(res) {
@@ -203,30 +247,36 @@
userInfo.avatar = res.data.path;
}
that.switchUserInfo[that.userIndex] = userInfo;
- editAvatar({avatar:res.data.path}).then((res)=>{
+ editAvatar({
+ avatar: res.data.path
+ }).then((res) => {
that.$util.Tips({
- title:res.message,
+ title: res.message,
})
- })
- });
- },
+ })
+ });
+ },
// 修改昵称
- changeInput(){
- if(this.open_update_info == 0){
+ changeInput() {
+ if (this.open_update_info == 0) {
return;
}
uni.navigateTo({
url: '/pages/users/user_nickname/index',
})
- },
+ },
// 微信头像获取
onChooseAvatar(e) {
- const {avatarUrl} = e.detail
+ const {
+ avatarUrl
+ } = e.detail
this.$util.uploadImgs('upload/image', avatarUrl, (res) => {
this.userInfo.avatar = res.data.path
- editAvatar({avatar:res.data.path}).then((res)=>{
+ editAvatar({
+ avatar: res.data.path
+ }).then((res) => {
that.$util.Tips({
- title:res.message,
+ title: res.message,
})
})
}, (err) => {
@@ -236,17 +286,17 @@
// #ifdef APP-PLUS
appVersionConfig() {
let that = this;
- console.log('app:'+plus.runtime.appid)
+ console.log('app:' + plus.runtime.appid)
plus.runtime.getProperty(plus.runtime.appid, (info) => {
this.version = info.version;
- console.log('当前版本:'+ info.version)
- });
+ console.log('当前版本:' + info.version)
+ });
},
//#endif
switchAccounts: function(item, index) {
let userInfo = this.switchUserInfo[index],
that = this;
-
+
that.userIndex = index;
if (that.switchUserInfo.length <= 1) return true;
if (userInfo === undefined) return that.$util.Tips({
@@ -281,7 +331,7 @@
*
*/
outLogin: function() {
- let that = this;
+ let that = this;
if (that.loginType == 'h5') {
uni.showModal({
title: '提示',
@@ -319,29 +369,33 @@
switchUserInfo[i].user_type != "h5" &&
switchUserInfo[i].phone === ""
)
- switchUserInfo.splice(i, 1);
+ switchUserInfo.splice(i, 1);
//#endif
}
that.$set(that, "switchUserInfo", switchUserInfo);
})
},
/**修改密码*/
- changePwd(){
+ changePwd() {
let that = this;
- if(that.userInfo.phone){
+ if (that.userInfo.phone) {
uni.navigateTo({
url: `/pages/users/user_modify_pwd/index`
})
- }else{
+ } else {
that.$util.Tips({
title: '请先绑定手机号'
});
}
},
+ showPopup() {
+ if (this.promotion_code) return Toast('已经填写过了');
+ this.$refs.popup.open();
+ },
//注销账号
- changeCancel(){
+ changeCancel() {
uni.navigateTo({
- url: '/pages/users/user_about/index?from='+'the_cancellation_msg'
+ url: '/pages/users/user_about/index?from=' + 'the_cancellation_msg'
})
},
/**
@@ -351,20 +405,44 @@
let that = this;
getUserInfo().then(res => {
that.$set(that, 'userInfo', res.data);
- if(res.data.phone){
+ this.promotion_code = this.userInfo.promotion_code;
+ if (res.data.phone) {
that.userAcc();
}
});
+ },
+
+ /**
+ * 获取版本信息
+ */
+ getVerion() {
+ this.$store.dispatch('INIT_CONFIG', true);
+ },
+
+ // 填写邀请码
+ submitCode() {
+ if (!this.promotion_code) return;
+ bindPromotionCode({
+ promotion_code: this.promotion_code
+ }).then(res => {
+ this.$refs.popup.close();
+ this.$nextTick(() => {
+ Toast('修改成功');
+ })
+ }).catch(err => {
+ console.log(err);
+ })
}
}
}
+
+ .personal-data .list .item .input {
+ min-width: 415rpx;
+ text-align: right;
+ color: #868686;
+ }
+
+ .personal-data .list .item .input .id {
+ width: 365rpx;
+ }
+
+ .personal-data .list .item .input .iconfont {
+ font-size: 35rpx;
+ }
+
+ .code-popup {
+ width: 600rpx;
+ height: 300rpx;
+ background-color: #fff;
+ border-radius: 28rpx;
+ padding: 28rpx;
+ display: flex;
+ flex-direction: column;
+ justify-content: space-between;
+
+ /deep/.u-border {
+ border-color: transparent !important;
+ }
+
+ .title {
+ text-align: center;
+ }
+
+ .code-btn {
+ background-color: $theme-color;
+ border-radius: 40rpx;
+ color: #fff;
+ }
+ }
+
\ No newline at end of file