From 2df0354b45e0d2f516ec8aa63c27bb96f486f06b Mon Sep 17 00:00:00 2001 From: zhaojs <349234519@qq.com> Date: 星期六, 03 六月 2023 12:50:22 +0800 Subject: [PATCH] no message --- uniapp/manifest.json | 6 +- uniapp/pages.json | 4 + uniapp/utils/http.api.js | 4 + uniapp/pages/mine/setting/modifyInviteCode.vue | 159 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 169 insertions(+), 4 deletions(-) diff --git a/uniapp/manifest.json b/uniapp/manifest.json index 952bce6..2309740 100644 --- a/uniapp/manifest.json +++ b/uniapp/manifest.json @@ -2,8 +2,8 @@ "name" : "澶ц繑瀹�", "appid" : "__UNI__FC8858A", "description" : "澶ц繑瀹榓pp", - "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" : { diff --git a/uniapp/pages.json b/uniapp/pages.json index ec04824..ab75ab6 100644 --- a/uniapp/pages.json +++ b/uniapp/pages.json @@ -20,6 +20,10 @@ { "path": "pages/mine/setting/modifyInfo" }, + // 淇敼閭�璇风爜 + { + "path": "pages/mine/setting/modifyInviteCode" + }, // 淇敼淇℃伅 { "path": "pages/mine/setting/cancellation" diff --git a/uniapp/pages/mine/setting/modifyInviteCode.vue b/uniapp/pages/mine/setting/modifyInviteCode.vue new file mode 100644 index 0000000..241e36a --- /dev/null +++ b/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> diff --git a/uniapp/utils/http.api.js b/uniapp/utils/http.api.js index e9bee05..ec36b98 100644 --- a/uniapp/utils/http.api.js +++ b/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"; // 姝ゅ绗簩涓弬鏁皏m锛屽氨鏄垜浠湪椤甸潰浣跨敤鐨則his锛屼綘鍙互閫氳繃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); //淇敼閭�璇风爜 // 灏嗗悇涓畾涔夌殑鎺ュ彛鍚嶇О锛岀粺涓�鏀捐繘瀵硅薄鎸傝浇鍒皏m.$u.api(鍥犱负vm灏辨槸this锛屼篃鍗硉his.$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 { -- Gitblit v1.9.3