zhaojs
2023-06-03 2df0354b45e0d2f516ec8aa63c27bb96f486f06b
no message
已添加1个文件
已修改3个文件
173 ■■■■■ 文件已修改
uniapp/manifest.json 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
uniapp/pages.json 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
uniapp/pages/mine/setting/modifyInviteCode.vue 159 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
uniapp/utils/http.api.js 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
uniapp/manifest.json
@@ -2,8 +2,8 @@
    "name" : "大返官",
    "appid" : "__UNI__FC8858A",
    "description" : "大返官app",
    "versionName" : "1.1.1",
    "versionCode" : 111,
    "versionName" : "1.1.2",
    "versionCode" : 112,
    "transformPx" : false,
    /* 5+App特有相关 */
    "app-plus" : {
@@ -221,7 +221,7 @@
            "disableHostCheck" : true, // å¼€å¯å¯ä»¥ç”¨è‡ªå·±çš„域名
            "proxy" : {
                "/api" : {
                    "target" : "http://dfgapp.ushopvip.com",
                    "target" : "http://dfg.shop.com/index.php",
                    "changeOrigin" : true,
                    "secure" : false,
                    "pathRewrite" : {
uniapp/pages.json
@@ -20,6 +20,10 @@
        {
            "path": "pages/mine/setting/modifyInfo"
        },
        // ä¿®æ”¹é‚€è¯·ç 
        {
            "path": "pages/mine/setting/modifyInviteCode"
        },
        // ä¿®æ”¹ä¿¡æ¯
        {
            "path": "pages/mine/setting/cancellation"
uniapp/pages/mine/setting/modifyInviteCode.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,159 @@
<template>
    <view class="modifyPass-container wrapperLayer">
        <titleBar titleText='' :pageForm='"modifyPass"'></titleBar>
        <view class="pageInfoContent-container colCen borderBox">
            <view class="titleText">
                ä¿®æ”¹é‚€è¯·ç 
            </view>
            <view class="input-container colCen">
                <view class="outSidebox rowCenBet" data-type='code'>
                    <input
                        maxlength="8"
                        type="text"
                        v-model="code"
                        placeholder="请输入新的邀请码"
                        placeholder-class="input-placeHolder"/>
                </view>
            </view>
            <view class="txtTips">
                é‚€è¯·ç éœ€è®¾ç½®ä¸º4~8位的数字与字母的组合。
            </view>
            <view class="login-btn rowCenCen" :class="true?'colorfulbtn':''" @click="modify()">
                <view class="btn-font">
                    ç¡®è®¤ä¿®æ”¹
                </view>
            </view>
        </view>
    </view>
</template>
<script>
    import titleBar from '../../../components/backTitlebar.vue'
    import MD5 from '../../../utils/md5.js'
    import config from '../../../utils/config.js'
    import utils from '../../../utils/utils.js'
    export default {
        components: {
            titleBar
        },
        data(){
            return{
                user:'',
                code:''
            }
        },
        onLoad() {
        },
        methods:{
            modify() {
                var that = this;
                var str = /^[a-zA-Z0-9]{4,8}$/;
                if (str.test(this.code)) {
                    this.$u.api.changeCode({
                        invite_code:this.code
                    }).then(e => {
                        if(e.code == 1)return that.$alert(e.msg);
                        that.$alert('修改成功');
                        setTimeout(function(){
                            uni.navigateBack({
                                delta:1
                            })
                        },1000)
                    }).catch(function (err) {
                    })
                } else {
                    uni.showToast({
                        title: '邀请码不符合要求,请输入4~8位的数字与字母的组合',
                        icon: 'none',
                        position: 'bottom',
                        duration: 3000
                    });
                }
            }
        }
    }
</script>
<style lang="scss">
    .modifyPass-container{
        width: 100%;
        min-height: 100vh;
        background-color: #FFFFFF;
        .pageInfoContent-container{
            width: 100%;
            padding: 0 60rpx;
            .titleText{
                width: 100%;
                font-size: 42rpx;
                font-weight: bold;
                color: #333333;
                margin: 60rpx 0;
            }
            .input-container{
                width: 100%;
                margin-bottom: 20rpx;
                .outSidebox{
                    width: 100%;
                    height: 85rpx;
                    border-bottom: 2rpx solid #F1F1F1;
                    .input-placeHolder{
                        font-size: 34rpx;
                        font-weight: 500;
                        color: #CACACA;
                    }
                    input{
                        font-size: 34rpx;
                        font-weight: 500;
                        color: #222222;
                    }
                    .hidepass{
                        font-size: 32rpx;
                        font-weight: 800;
                        color: #CACACA;
                    }
                    .getcodebox{
                        font-size: 28rpx;
                        white-space: nowrap;
                        font-weight: 400;
                        color: #FF2851;
                        pointer-events: none;
                    }
                    .colorTxt{
                        pointer-events: auto;
                    }
                }
                .outSidebox-active{
                    border-bottom: 2rpx solid #FF2851;
                }
            }
            .login-btn{
                width: 100%;
                height: 86rpx;
                background: #E2E2E2;
                border-radius: 43rpx;
                margin-top: 80rpx;
                pointer-events: none;
                .btn-font{
                    font-size: 30rpx;
                    font-weight: 500;
                    color: #FFFFFF;
                }
            }
            .txtTips {
                font-size: 26rpx;
                font-weight: 400;
                color: #999999;
                line-height: 38rpx;
            }
            .colorfulbtn{
                background: #FD002F;
                pointer-events: auto;
            }
        }
    }
</style>
uniapp/utils/http.api.js
@@ -97,6 +97,7 @@
let getPrivilegeShareLinkUrl = "api/taoke/get_privilege_share_link";
let eleStoreListUrl = "api/taoke/ele_store_list";
let getHdkCategoryListUrl="/api/taoke/get_hdk_category_list";
let changeCodeUrl="/api/user/changecode";
// æ­¤å¤„第二个参数vm,就是我们在页面使用的this,你可以通过vm获取vuex等操作,更多内容详见uView对拦截器的介绍部分:
// https://uviewui.com/js/http.html#%E4%BD%95%E8%B0%93%E8%AF%B7%E6%B1%82%E6%8B%A6%E6%88%AA%EF%BC%9F
@@ -200,8 +201,9 @@
    let getPrivilegeShareLink = (params = {}) => vm.$u.post(getPrivilegeShareLinkUrl, params); 
    let eleStoreList = (params = {}) => vm.$u.post(eleStoreListUrl, params); 
    let getHdkCategoryList= (params = {}) => vm.$u.post(getHdkCategoryListUrl, params); 
    let changeCode=(params = {}) => vm.$u.post(changeCodeUrl, params); //修改邀请码
    // å°†å„个定义的接口名称,统一放进对象挂载到vm.$u.api(因为vm就是this,也即this.$u.api)下
    vm.$u.api = {getHdkCategoryList,eleStoreList,getPrivilegeShareLink,getDyGoodsDetail,bindMobileLogin,getTopMessId,changePwd,comminInt,wxapplogin,getTopCalss,getBanner,getHomeMenu,getSuperClass,getMQD,getGoodThing,login,sendSms,mobileLogin,setPwd,getUserInfo,getTalentInfo,getMessageList,getGoodsDetail,getPrivilegeLink,getSimilerGoods,getJdsDetail,getPddDetail,getM,getWphGoodsDetail,addCollect,delCollect,hotKey,suggestion,goodsSearch,activityLink,unionAct,singlePageLink,checkPddAuth,getPddAuth,getPineGoods,jdGoodsList,optimusMaterial,pddGoodsList,brandList,brandInfo,wphGoodsList,meituanAct,eleAct,eleShangjin,userHomemenu,getAppVersion,userBrowse,delBrowse,activitySingle,userCollect,bdHomemenu,getCity,coordinate,cityCate,searchDeals,getCityId,seckillShowinfo,seckillList,identifyGoods,changeMobile,bindInvitation,getInviteInfo,getEstimateAmount,fansList,getFansCount,getHelpType,getHelpList,getHelpDetail,getWpanurl,getChainTurning,superDiscountGoods,getHistory,getTbGoodsList,cateRankList,getUpgradeInfo,getEquityCard,levelApply,orderList,userProfit,bindZfb,withdraw,getBalanceLog,getPublisher,getAlbum,likeAlbum,albumDetail,anchorFollow,myFollowAlbum,feedback,userCancel,profile,bindWechat,unboundWechat};
    vm.$u.api = {changeCode,getHdkCategoryList,eleStoreList,getPrivilegeShareLink,getDyGoodsDetail,bindMobileLogin,getTopMessId,changePwd,comminInt,wxapplogin,getTopCalss,getBanner,getHomeMenu,getSuperClass,getMQD,getGoodThing,login,sendSms,mobileLogin,setPwd,getUserInfo,getTalentInfo,getMessageList,getGoodsDetail,getPrivilegeLink,getSimilerGoods,getJdsDetail,getPddDetail,getM,getWphGoodsDetail,addCollect,delCollect,hotKey,suggestion,goodsSearch,activityLink,unionAct,singlePageLink,checkPddAuth,getPddAuth,getPineGoods,jdGoodsList,optimusMaterial,pddGoodsList,brandList,brandInfo,wphGoodsList,meituanAct,eleAct,eleShangjin,userHomemenu,getAppVersion,userBrowse,delBrowse,activitySingle,userCollect,bdHomemenu,getCity,coordinate,cityCate,searchDeals,getCityId,seckillShowinfo,seckillList,identifyGoods,changeMobile,bindInvitation,getInviteInfo,getEstimateAmount,fansList,getFansCount,getHelpType,getHelpList,getHelpDetail,getWpanurl,getChainTurning,superDiscountGoods,getHistory,getTbGoodsList,cateRankList,getUpgradeInfo,getEquityCard,levelApply,orderList,userProfit,bindZfb,withdraw,getBalanceLog,getPublisher,getAlbum,likeAlbum,albumDetail,anchorFollow,myFollowAlbum,feedback,userCancel,profile,bindWechat,unboundWechat};
}
export default {