提示新注册用户完善个人信息

This commit is contained in:
qcl_123 2025-12-29 13:43:19 +08:00
parent 5d2992f4f8
commit c5c2535cce
76 changed files with 24103 additions and 16712 deletions

30
App.vue
View File

@ -19,35 +19,7 @@
onHide: function() { onHide: function() {
console.log('App Hide') console.log('App Hide')
}, },
methods: { methods: {}
$createWatcher(name) {
getApp().globalData.watcher = this.$watch(
'bleValue',
val => {
this[name](val)
}, {
deep: true,
immediate: true
}
)
},
$removeWatcher() {
if (getApp().globalData.watcher) {
getApp().globalData.watcher()
console.log("watch移除成功")
} else {
console.log("没有watch可移除")
}
},
// handleHomeConfig() {
// let that = this
// that.$model.getHomeConfig({}).then(res => {
// if (res.code != 0) return
// that.$store.commit('changeMenuList', res.data.cook_label)
// that.$store.commit('changeFoodList', res.data.food_list)
// })
// },
}
} }
</script> </script>

View File

@ -62,9 +62,10 @@
<view class="lan border-bottom"> <view class="lan border-bottom">
<view class="left">活动系数</view> <view class="left">活动系数</view>
<view class="right"> <view class="right">
<picker mode="selector" @change="changeClickType" :range="activityLevel" range-key="name" :value="levelInd"> <picker mode="selector" @change="changeClickType" :range="activityLevel" range-key="name"
:value="levelInd">
<view> <view>
{{activityLevel[levelInd].name}} {{levelInd?activityLevel[levelInd].name:'请选择'}}
<icon class="iconfont icon-arrow-down"></icon> <icon class="iconfont icon-arrow-down"></icon>
</view> </view>
</picker> </picker>
@ -95,7 +96,7 @@
weight: "", weight: "",
gender: 0, gender: 0,
nickname: "", nickname: "",
activity_level: 0, activity_level: "",
}, },
}; };
}, },
@ -160,7 +161,7 @@
that.$model.getUserInfoEdit(data).then(res => { that.$model.getUserInfoEdit(data).then(res => {
if (res.code == 0) { if (res.code == 0) {
that.$tools.msg("提交成功"); that.$tools.msg("提交成功");
that.handleHomeUserInfo() that.$store.dispatch("getUserInfo")
uni.navigateBack({ uni.navigateBack({
delta: 1 delta: 1
}); });
@ -169,14 +170,6 @@
} }
}); });
}, },
//
handleHomeUserInfo() {
let that = this
that.$model.getHomeUserInfo({}).then(res => {
if (res.code != 0) return
that.$store.commit('changeUserInfo', res.data)
})
},
// //
maskClick(e) { maskClick(e) {
console.log("出生日期", e.detail.value) console.log("出生日期", e.detail.value)

View File

@ -100,7 +100,7 @@
} }
}, },
computed: { computed: {
...mapState(["configInfo"]), ...mapState(["configInfo","user"]),
menu() { menu() {
return this.configInfo.cookbook_label return this.configInfo.cookbook_label
}, },
@ -270,6 +270,10 @@
that.$tools.msg("登录后查看等多!") that.$tools.msg("登录后查看等多!")
return return
} }
if (that.user.aud_id == '') {
that.$tools.msg("完善资料后查看更多")
return
}
if (!that.info.cover) { if (!that.info.cover) {
that.$tools.msg("请上传封面图!") that.$tools.msg("请上传封面图!")
return return

View File

@ -9,7 +9,7 @@
</view> </view>
<view v-else class="content_box"> <view v-else class="content_box">
<!-- 称重 --> <!-- 称重 -->
<view class="blue-tooth"> <view class="blue-tooth" v-if="user.aud_id!=''">
<blue-tooth :btnType="'1'"></blue-tooth> <blue-tooth :btnType="'1'"></blue-tooth>
</view> </view>
<!-- 每日摄入 --> <!-- 每日摄入 -->
@ -102,6 +102,10 @@
</view> </view>
</view> </view>
</view> </view>
<view class="fenxi" @click="navTo('/pageTwo/count/everyDay?page=count')">
<image src="/static/fenxi.png"></image>
营养分析
</view>
</view> </view>
<view v-else class="list2" @click="handleEditUser()"> <view v-else class="list2" @click="handleEditUser()">
<view class="nolist"> <view class="nolist">
@ -110,10 +114,6 @@
</view> </view>
<view class="btn">完善资料</view> <view class="btn">完善资料</view>
</view> </view>
<view class="fenxi" @click="navTo('/pageTwo/count/everyDay?page=count')">
<image src="/static/fenxi.png"></image>
营养分析
</view>
</view> </view>
<!-- 营养含量分析 --> <!-- 营养含量分析 -->

View File

@ -7,15 +7,14 @@
</view> </view>
<!-- 个人资料 --> <!-- 个人资料 -->
<view v-if="token" class="content-box"> <view v-if="token" class="content-box">
<view class="box" v-if="info.aud_id!=''"> <view class="box" v-if="info.aud_id">
<view class="info"> <view class="info">
<!-- /pageTwo/me/userEdit --> <view class="name" @click="handleUserEdit">
<view class="name" @click="navTo('/pageTwo/me/userEdit')">
<image :src="info.head_pic"></image> <image :src="info.head_pic"></image>
<text class="bold">{{info.nickname}}</text> <text class="bold">{{info.nickname}}</text>
<text>{{info.gender=='1'?'男':'女'}}</text> <text>{{info.gender=='1'?'男':'女'}}</text>
</view> </view>
<view class="edit" @click="navTo('/pageTwo/me/userEdit')"> <view class="edit" @click="handleUserEdit">
<image src="/static/26.png"></image> <image src="/static/26.png"></image>
</view> </view>
</view> </view>
@ -34,7 +33,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="box1 box" v-else @click="navTo('/pageTwo/me/userEdit')"> <view class="box1 box" v-else @click="handleUserEdit">
<view class="info2"> <view class="info2">
完善资料后记录更准确哦 完善资料后记录更准确哦
</view> </view>
@ -168,12 +167,12 @@
foodInfo() { foodInfo() {
let that = this let that = this
this.handTrue = false this.handTrue = false
this.$nextTick(() => { that.$nextTick(() => {
this.handTrue = true that.handTrue = true
that.chartData.series[0].data = this.user.aud_id != "" ? Number(this.user.food_count that.chartData.series[0].data = that.user.aud_id ? Number(that.user.food_count
.nutrients_four[0].proportion) / 100 : 0 .nutrients_four[0].proportion) / 100 : 0
}) })
return this.user.aud_id != "" ? this.user.food_count : this.configInfo.default_count_foot return this.user.aud_id ? this.user.food_count : this.configInfo.default_count_foot
} }
}, },
onLoad() { onLoad() {
@ -203,7 +202,7 @@
that.handTrue = false that.handTrue = false
this.$nextTick(() => { this.$nextTick(() => {
that.handTrue = true that.handTrue = true
that.chartData.series[0].data = that.user.aud_id != "" ? Number(that.user.food_count that.chartData.series[0].data = that.user.aud_id ? Number(that.user.food_count
.nutrients_four[0].proportion) / 100 : 0 .nutrients_four[0].proportion) / 100 : 0
}) })
this.startWatching() this.startWatching()
@ -215,7 +214,7 @@
handleInfo() { handleInfo() {
let that = this let that = this
this.$nextTick(() => { this.$nextTick(() => {
that.chartData.series[0].data = that.user.aud_id == "" ? 0 : Number(that.user.food_count that.chartData.series[0].data = that.user.aud_id ? 0 : Number(that.user.food_count
.nutrients_four[0] .nutrients_four[0]
.proportion) / 100 .proportion) / 100
}) })
@ -246,12 +245,22 @@
url: "/pageTwo/login/login" url: "/pageTwo/login/login"
}) })
}, },
//
handleUserEdit() {
uni.navigateTo({
url: "/pageTwo/me/userEdit"
})
},
handleAddFood(name) { handleAddFood(name) {
let that = this let that = this
if (!that.token) { if (!that.token) {
that.$tools.msg("登录后查看更多") that.$tools.msg("登录后查看更多")
return return
} }
if (that.info.aud_id == '') {
that.$tools.msg("完善资料后查看更多")
return
}
unwatch(); unwatch();
uni.navigateTo({ uni.navigateTo({
url: "/pageTwo/count/search?name=" + name + "&time=" + this.foodInfo.date url: "/pageTwo/count/search?name=" + name + "&time=" + this.foodInfo.date
@ -259,10 +268,15 @@
}, },
// //
navTo(url) { navTo(url) {
let that = this
if (!this.token) { if (!this.token) {
this.$tools.msg("登录后查看更多") this.$tools.msg("登录后查看更多")
return return
} }
if (that.info.aud_id == '') {
that.$tools.msg("完善资料后查看更多")
return
}
uni.navigateTo({ uni.navigateTo({
url url
}) })

View File

@ -29,6 +29,9 @@
</template> </template>
<script> <script>
import {
mapState
} from "vuex";
import search from '@/components/search2.vue'; import search from '@/components/search2.vue';
export default { export default {
name: "list", name: "list",
@ -49,6 +52,9 @@
components: { components: {
search search
}, },
computed: {
...mapState(["user"]),
},
onLoad(options) { onLoad(options) {
let that = this let that = this
that.search_value = options.name that.search_value = options.name
@ -81,6 +87,11 @@
}, },
// //
handleDetail(id) { handleDetail(id) {
let that = this
if (that.user.aud_id == '') {
that.$tools.msg("完善资料后查看更多")
return
}
uni.navigateTo({ uni.navigateTo({
url: "/pageTwo/me/menudetail?id=" + id url: "/pageTwo/me/menudetail?id=" + id
}) })

View File

@ -21,12 +21,17 @@ export default {
}) { }) {
return model.getHomeUserInfo({}).then(res => { return model.getHomeUserInfo({}).then(res => {
if (res.code != 0) { if (res.code != 0) {
commit('changeUserInfo', { tools.msg(res.msg)
aud_id: ""
})
return return
} }
if (res.data.weight == 0 || res.data.weight == null || res.data.weight == "") {
commit('changeUserInfo', {
isEditInfo: true,
aud_id: ""
})
} else {
commit('changeUserInfo', res.data) commit('changeUserInfo', res.data)
}
dispatch("getCountFoodInfo", { dispatch("getCountFoodInfo", {
aud_id: res.data.aud_id, aud_id: res.data.aud_id,
time: tools.getDate("start") time: tools.getDate("start")

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,8 +1,8 @@
var isReady=false;var onReadyCallbacks=[]; var isReady=false;var onReadyCallbacks=[];
var isServiceReady=false;var onServiceReadyCallbacks=[]; var isServiceReady=false;var onServiceReadyCallbacks=[];
var __uniConfig = {"pages":["pages/index/index","pages/menu/menu","pages/add/add","pages/count/count","pages/me/me","pages/add/Preview","pages/search/search","pageTwo/login/forgetPassword","pageTwo/login/login","pageTwo/me/feedBack","pageTwo/me/userEdit","pageTwo/me/record","pageTwo/me/mymenu","pageTwo/me/menudetail","pageTwo/me/foodlist","pageTwo/count/setting","pageTwo/count/KcalEdit","pageTwo/count/food","pageTwo/webview/webview","pageTwo/setting/setting","pageTwo/setting/password","pageTwo/setting/email","pageTwo/setting/phone","pageTwo/me/menuEdit"],"window":{"navigationBarTextStyle":"black","navigationBarTitleText":"uni-app","navigationBarBackgroundColor":"#efefef","backgroundColor":"#efefef"},"tabBar":{"color":"#333","selectedColor":"#ff4c4f","backgroundColor":"#fff","list":[{"pagePath":"pages/index/index","iconPath":"static/home.png","selectedIconPath":"static/home01.png","text":"首页"},{"pagePath":"pages/menu/menu","iconPath":"static/cai.png","selectedIconPath":"static/cai01.png","text":"菜谱"},{"pagePath":"pages/add/add","iconPath":"static/add.png","selectedIconPath":"static/add.png","text":""},{"pagePath":"pages/count/count","iconPath":"static/ji.png","selectedIconPath":"static/ji01.png","text":"计食"},{"pagePath":"pages/me/me","iconPath":"static/me.png","selectedIconPath":"static/me01.png","text":"我的"}]},"darkmode":false,"nvueCompiler":"uni-app","nvueStyleCompiler":"uni-app","renderer":"auto","splashscreen":{"alwaysShowBeforeRender":true,"autoclose":false},"appname":"kitchendDevice","compilerVersion":"4.76","entryPagePath":"pages/index/index","networkTimeout":{"request":60000,"connectSocket":60000,"uploadFile":60000,"downloadFile":60000}}; var __uniConfig = {"pages":["pages/index/index","pages/menu/menu","pages/add/add","pages/count/count","pages/me/me","pages/add/Preview","pages/search/search","pages/search/list","pageTwo/login/forgetPassword","pageTwo/login/login","pageTwo/me/feedBack","pageTwo/me/userEdit","pageTwo/me/record","pageTwo/me/recordetail","pageTwo/me/mymenu","pageTwo/me/menudetail","pageTwo/me/foodlist","pageTwo/count/setting","pageTwo/count/KcalEdit","pageTwo/count/everyMeal","pageTwo/count/search","pageTwo/webview/webview","pageTwo/setting/setting","pageTwo/setting/password","pageTwo/setting/email","pageTwo/setting/phone","pageTwo/me/menuEdit","pageTwo/count/everyDay"],"window":{"navigationBarTextStyle":"black","navigationBarTitleText":"uni-app","navigationBarBackgroundColor":"#3CB383","backgroundColor":"#f7f7f7"},"tabBar":{"color":"#333","selectedColor":"#3CB383","backgroundColor":"#fff","list":[{"pagePath":"pages/index/index","iconPath":"static/home.png","selectedIconPath":"static/home01.png","text":"首页"},{"pagePath":"pages/search/search","iconPath":"static/cai.png","selectedIconPath":"static/cai01.png","text":"教你做"},{"pagePath":"pages/add/add","iconPath":"static/add.png","selectedIconPath":"static/add.png","text":""},{"pagePath":"pages/count/count","iconPath":"static/ji.png","selectedIconPath":"static/ji01.png","text":"计食"},{"pagePath":"pages/me/me","iconPath":"static/me.png","selectedIconPath":"static/me01.png","text":"我的"}]},"darkmode":false,"nvueCompiler":"uni-app","nvueStyleCompiler":"uni-app","renderer":"auto","splashscreen":{"alwaysShowBeforeRender":true,"autoclose":false},"appname":"kitchendDevice","compilerVersion":"4.76","entryPagePath":"pages/index/index","networkTimeout":{"request":60000,"connectSocket":60000,"uploadFile":60000,"downloadFile":60000}};
var __uniRoutes = [{"path":"/pages/index/index","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationBarTitleText":"首页","enablePullDownRefresh":true}},{"path":"/pages/menu/menu","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationBarTitleText":"菜谱","enablePullDownRefresh":true}},{"path":"/pages/add/add","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationBarTitleText":"添加食谱","enablePullDownRefresh":false}},{"path":"/pages/count/count","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationBarTitleText":"计食","enablePullDownRefresh":false}},{"path":"/pages/me/me","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationBarTitleText":"个人中心","enablePullDownRefresh":false}},{"path":"/pages/add/Preview","meta":{},"window":{"navigationBarTitleText":""}},{"path":"/pages/search/search","meta":{},"window":{"navigationBarTitleText":"搜索"}},{"path":"/pageTwo/login/forgetPassword","meta":{},"window":{"navigationBarTitleText":"密码","enablePullDownRefresh":false}},{"path":"/pageTwo/login/login","meta":{},"window":{"navigationBarTitleText":"登录","enablePullDownRefresh":false,"navigationStyle":"custom"}},{"path":"/pageTwo/me/feedBack","meta":{},"window":{"navigationBarTitleText":"意见反馈","navigationBarBackgroundColor":"#F9FAFC"}},{"path":"/pageTwo/me/userEdit","meta":{},"window":{"navigationBarTitleText":"个人资料","navigationBarBackgroundColor":"#F9FAFC"}},{"path":"/pageTwo/me/record","meta":{},"window":{"navigationBarTitleText":"饮食记录","enablePullDownRefresh":false}},{"path":"/pageTwo/me/mymenu","meta":{},"window":{"navigationBarTitleText":"","enablePullDownRefresh":false}},{"path":"/pageTwo/me/menudetail","meta":{},"window":{"navigationBarTitleText":"详情","enablePullDownRefresh":false}},{"path":"/pageTwo/me/foodlist","meta":{},"window":{"navigationBarTitleText":"食材库","enablePullDownRefresh":true}},{"path":"/pageTwo/count/setting","meta":{},"window":{"navigationBarTitleText":"设置","enablePullDownRefresh":false}},{"path":"/pageTwo/count/KcalEdit","meta":{},"window":{"navigationBarTitleText":"自定义卡路里","enablePullDownRefresh":false}},{"path":"/pageTwo/count/food","meta":{},"window":{"navigationBarTitleText":"食材","enablePullDownRefresh":false}},{"path":"/pageTwo/webview/webview","meta":{},"window":{"navigationBarTitleText":"","enablePullDownRefresh":false}},{"path":"/pageTwo/setting/setting","meta":{},"window":{"navigationBarTitleText":"设置","enablePullDownRefresh":false}},{"path":"/pageTwo/setting/password","meta":{},"window":{"navigationBarTitleText":"修改密码","enablePullDownRefresh":false}},{"path":"/pageTwo/setting/email","meta":{},"window":{"navigationBarTitleText":"绑定邮箱","enablePullDownRefresh":false}},{"path":"/pageTwo/setting/phone","meta":{},"window":{"navigationBarTitleText":"绑定手机号","enablePullDownRefresh":false}},{"path":"/pageTwo/me/menuEdit","meta":{},"window":{"navigationBarTitleText":""}}]; var __uniRoutes = [{"path":"/pages/index/index","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationBarTitleText":"首页","enablePullDownRefresh":true}},{"path":"/pages/menu/menu","meta":{},"window":{"navigationBarTitleText":"菜谱","enablePullDownRefresh":true}},{"path":"/pages/add/add","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationBarTitleText":"添加食谱","enablePullDownRefresh":false}},{"path":"/pages/count/count","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationBarTitleText":"计食","enablePullDownRefresh":false}},{"path":"/pages/me/me","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationBarTitleText":"个人中心","enablePullDownRefresh":false}},{"path":"/pages/add/Preview","meta":{},"window":{"navigationBarTitleText":""}},{"path":"/pages/search/search","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationBarTitleText":"搜索菜谱"}},{"path":"/pages/search/list","meta":{},"window":{"navigationBarTitleText":""}},{"path":"/pageTwo/login/forgetPassword","meta":{},"window":{"navigationBarTitleText":"密码","enablePullDownRefresh":false}},{"path":"/pageTwo/login/login","meta":{},"window":{"navigationBarTitleText":"登录","enablePullDownRefresh":false,"navigationStyle":"custom"}},{"path":"/pageTwo/me/feedBack","meta":{},"window":{"navigationBarTitleText":"意见反馈"}},{"path":"/pageTwo/me/userEdit","meta":{},"window":{"navigationBarTitleText":"个人资料"}},{"path":"/pageTwo/me/record","meta":{},"window":{"navigationBarTitleText":"饮食记录","enablePullDownRefresh":false}},{"path":"/pageTwo/me/recordetail","meta":{},"window":{"navigationBarTitleText":"饮食详情","enablePullDownRefresh":false}},{"path":"/pageTwo/me/mymenu","meta":{},"window":{"navigationBarTitleText":"","enablePullDownRefresh":false}},{"path":"/pageTwo/me/menudetail","meta":{},"window":{"navigationBarTitleText":"详情","enablePullDownRefresh":false}},{"path":"/pageTwo/me/foodlist","meta":{},"window":{"navigationBarTitleText":"食材库","enablePullDownRefresh":true}},{"path":"/pageTwo/count/setting","meta":{},"window":{"navigationBarTitleText":"设置","enablePullDownRefresh":false,"popGesture":"none"}},{"path":"/pageTwo/count/KcalEdit","meta":{},"window":{"navigationBarTitleText":"自定义卡路里","enablePullDownRefresh":false}},{"path":"/pageTwo/count/everyMeal","meta":{},"window":{"navigationBarTitleText":"餐食详情","enablePullDownRefresh":false}},{"path":"/pageTwo/count/search","meta":{},"window":{"navigationBarTitleText":"食材搜索","enablePullDownRefresh":false}},{"path":"/pageTwo/webview/webview","meta":{},"window":{"navigationBarTitleText":"","enablePullDownRefresh":false}},{"path":"/pageTwo/setting/setting","meta":{},"window":{"navigationBarTitleText":"设置","enablePullDownRefresh":false}},{"path":"/pageTwo/setting/password","meta":{},"window":{"navigationBarTitleText":"修改密码","enablePullDownRefresh":false}},{"path":"/pageTwo/setting/email","meta":{},"window":{"navigationBarTitleText":"绑定邮箱","enablePullDownRefresh":false}},{"path":"/pageTwo/setting/phone","meta":{},"window":{"navigationBarTitleText":"绑定手机号","enablePullDownRefresh":false}},{"path":"/pageTwo/me/menuEdit","meta":{},"window":{"navigationBarTitleText":""}},{"path":"/pageTwo/count/everyDay","meta":{},"window":{"navigationBarTitleText":"营养分析"}}];
__uniConfig.onReady=function(callback){if(__uniConfig.ready){callback()}else{onReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"ready",{get:function(){return isReady},set:function(val){isReady=val;if(!isReady){return}const callbacks=onReadyCallbacks.slice(0);onReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}}); __uniConfig.onReady=function(callback){if(__uniConfig.ready){callback()}else{onReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"ready",{get:function(){return isReady},set:function(val){isReady=val;if(!isReady){return}const callbacks=onReadyCallbacks.slice(0);onReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}});
__uniConfig.onServiceReady=function(callback){if(__uniConfig.serviceReady){callback()}else{onServiceReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"serviceReady",{get:function(){return isServiceReady},set:function(val){isServiceReady=val;if(!isServiceReady){return}const callbacks=onServiceReadyCallbacks.slice(0);onServiceReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}}); __uniConfig.onServiceReady=function(callback){if(__uniConfig.serviceReady){callback()}else{onServiceReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"serviceReady",{get:function(){return isServiceReady},set:function(val){isServiceReady=val;if(!isServiceReady){return}const callbacks=onServiceReadyCallbacks.slice(0);onServiceReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}});
service.register("uni-app-config",{create(a,b,c){if(!__uniConfig.viewport){var d=b.weex.config.env.scale,e=b.weex.config.env.deviceWidth,f=Math.ceil(e/d);Object.assign(__uniConfig,{viewport:f,defaultFontSize:Math.round(f/20)})}return{instance:{__uniConfig:__uniConfig,__uniRoutes:__uniRoutes,global:void 0,window:void 0,document:void 0,frames:void 0,self:void 0,location:void 0,navigator:void 0,localStorage:void 0,history:void 0,Caches:void 0,screen:void 0,alert:void 0,confirm:void 0,prompt:void 0,fetch:void 0,XMLHttpRequest:void 0,WebSocket:void 0,webkit:void 0,print:void 0}}}}); service.register("uni-app-config",{create(a,b,c){if(!__uniConfig.viewport){var d=b.weex.config.env.scale,e=b.weex.config.env.deviceWidth,f=Math.ceil(e/d);Object.assign(__uniConfig,{viewport:f,defaultFontSize:Math.round(f/20)})}return{instance:{__uniConfig:__uniConfig,__uniRoutes:__uniRoutes,global:void 0,window:void 0,document:void 0,frames:void 0,self:void 0,location:void 0,navigator:void 0,localStorage:void 0,history:void 0,Caches:void 0,screen:void 0,alert:void 0,confirm:void 0,prompt:void 0,fetch:void 0,XMLHttpRequest:void 0,WebSocket:void 0,webkit:void 0,print:void 0}}}});

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
{"@platforms":["android","iPhone","iPad"],"id":"__UNI__9A0614A","name":"kitchendDevice","version":{"name":"1.0.0","code":"100"},"description":"","launch_path":"__uniappview.html","developer":{"name":"","email":"","url":""},"permissions":{"UniNView":{"description":"UniNView原生渲染"}},"plus":{"useragent":{"value":"uni-app","concatenate":true},"splashscreen":{"target":"id:1","autoclose":true,"waiting":true,"delay":0},"popGesture":"close","launchwebview":{"id":"1","kernel":"WKWebview"},"statusbar":{"immersed":"supportedDevice","style":"dark","background":"#efefef"},"usingComponents":true,"nvueStyleCompiler":"uni-app","compilerVersion":3,"distribute":{"google":{"permissions":["<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>","<uses-permission android:name=\"android.permission.VIBRATE\"/>","<uses-permission android:name=\"android.permission.READ_LOGS\"/>","<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>","<uses-feature android:name=\"android.hardware.camera.autofocus\"/>","<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.CAMERA\"/>","<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>","<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>","<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>","<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>","<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>","<uses-feature android:name=\"android.hardware.camera\"/>","<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"]},"apple":{},"plugins":{"speech":{},"audio":{"mp3":{"description":"Android平台录音支持MP3格式文件"}}}},"uniStatistics":{"enable":false},"allowsInlineMediaPlayback":true,"safearea":{"background":"#fff","bottom":{"offset":"auto"}},"uni-app":{"compilerVersion":"4.76","control":"uni-v3","nvueCompiler":"uni-app","renderer":"auto","nvue":{"flex-direction":"column"},"nvueLaunchMode":"normal"},"tabBar":{"color":"#333","selectedColor":"#ff4c4f","backgroundColor":"#fff","list":[{"pagePath":"pages/index/index","iconPath":"static/home.png","selectedIconPath":"static/home01.png","text":"首页"},{"pagePath":"pages/menu/menu","iconPath":"static/cai.png","selectedIconPath":"static/cai01.png","text":"菜谱"},{"pagePath":"pages/add/add","iconPath":"static/add.png","selectedIconPath":"static/add.png","text":""},{"pagePath":"pages/count/count","iconPath":"static/ji.png","selectedIconPath":"static/ji01.png","text":"计食"},{"pagePath":"pages/me/me","iconPath":"static/me.png","selectedIconPath":"static/me01.png","text":"我的"}],"borderStyle":"rgba(0,0,0,0.4)","height":"50px","child":["lauchwebview"],"selected":0},"launch_path":"__uniappview.html"}} {"@platforms":["android","iPhone","iPad"],"id":"__UNI__20604F1","name":"kitchendDevice","version":{"name":"1.0.0","code":"100"},"description":"","launch_path":"__uniappview.html","developer":{"name":"","email":"","url":""},"permissions":{"UniNView":{"description":"UniNView原生渲染"}},"plus":{"useragent":{"value":"uni-app","concatenate":true},"splashscreen":{"target":"id:1","autoclose":true,"waiting":true,"delay":0},"popGesture":"close","launchwebview":{"id":"1","kernel":"WKWebview"},"statusbar":{"immersed":"supportedDevice","style":"dark","background":"#3CB383"},"usingComponents":true,"nvueStyleCompiler":"uni-app","compilerVersion":3,"distribute":{"google":{"permissions":["<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>","<uses-permission android:name=\"android.permission.VIBRATE\"/>","<uses-permission android:name=\"android.permission.READ_LOGS\"/>","<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>","<uses-feature android:name=\"android.hardware.camera.autofocus\"/>","<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>","<uses-permission android:name=\"android.permission.CAMERA\"/>","<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>","<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>","<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>","<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>","<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>","<uses-feature android:name=\"android.hardware.camera\"/>","<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"]},"apple":{},"plugins":{"speech":{},"audio":{"mp3":{"description":"Android平台录音支持MP3格式文件"}}}},"uniStatistics":{"enable":false},"allowsInlineMediaPlayback":true,"safearea":{"background":"#fff","bottom":{"offset":"auto"}},"uni-app":{"compilerVersion":"4.76","control":"uni-v3","nvueCompiler":"uni-app","renderer":"auto","nvue":{"flex-direction":"column"},"nvueLaunchMode":"normal"},"tabBar":{"color":"#333","selectedColor":"#3CB383","backgroundColor":"#fff","list":[{"pagePath":"pages/index/index","iconPath":"static/home.png","selectedIconPath":"static/home01.png","text":"首页"},{"pagePath":"pages/search/search","iconPath":"static/cai.png","selectedIconPath":"static/cai01.png","text":"教你做"},{"pagePath":"pages/add/add","iconPath":"static/add.png","selectedIconPath":"static/add.png","text":""},{"pagePath":"pages/count/count","iconPath":"static/ji.png","selectedIconPath":"static/ji01.png","text":"计食"},{"pagePath":"pages/me/me","iconPath":"static/me.png","selectedIconPath":"static/me01.png","text":"我的"}],"borderStyle":"rgba(0,0,0,0.4)","height":"50px","child":["lauchwebview"],"selected":0},"launch_path":"__uniappview.html"}}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 648 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 258 B

View File

@ -139,32 +139,7 @@ var _default = {
onHide: function onHide() { onHide: function onHide() {
console.log('App Hide'); console.log('App Hide');
}, },
methods: { methods: {}
$createWatcher: function $createWatcher(name) {
var _this = this;
getApp().globalData.watcher = this.$watch('bleValue', function (val) {
_this[name](val);
}, {
deep: true,
immediate: true
});
},
$removeWatcher: function $removeWatcher() {
if (getApp().globalData.watcher) {
getApp().globalData.watcher();
console.log("watch移除成功");
} else {
console.log("没有watch可移除");
}
} // handleHomeConfig() {
// let that = this
// that.$model.getHomeConfig({}).then(res => {
// if (res.code != 0) return
// that.$store.commit('changeMenuList', res.data.cook_label)
// that.$store.commit('changeFoodList', res.data.food_list)
// })
// },
}
}; };
exports.default = _default; exports.default = _default;

View File

@ -28161,12 +28161,17 @@ var _default = {
dispatch = _ref2.dispatch; dispatch = _ref2.dispatch;
return _model.default.getHomeUserInfo({}).then(function (res) { return _model.default.getHomeUserInfo({}).then(function (res) {
if (res.code != 0) { if (res.code != 0) {
commit('changeUserInfo', { _tools.default.msg(res.msg);
aud_id: ""
});
return; return;
} }
if (res.data.weight == 0 || res.data.weight == null || res.data.weight == "") {
commit('changeUserInfo', {
isEditInfo: true,
aud_id: ""
});
} else {
commit('changeUserInfo', res.data); commit('changeUserInfo', res.data);
}
dispatch("getCountFoodInfo", { dispatch("getCountFoodInfo", {
aud_id: res.data.aud_id, aud_id: res.data.aud_id,
time: _tools.default.getDate("start") time: _tools.default.getDate("start")

View File

@ -163,7 +163,7 @@ var _default = {
weight: "", weight: "",
gender: 0, gender: 0,
nickname: "", nickname: "",
activity_level: 0 activity_level: ""
} }
}; };
}, },
@ -229,7 +229,7 @@ var _default = {
that.$model.getUserInfoEdit(data).then(function (res) { that.$model.getUserInfoEdit(data).then(function (res) {
if (res.code == 0) { if (res.code == 0) {
that.$tools.msg("提交成功"); that.$tools.msg("提交成功");
that.handleHomeUserInfo(); that.$store.dispatch("getUserInfo");
uni.navigateBack({ uni.navigateBack({
delta: 1 delta: 1
}); });
@ -238,14 +238,6 @@ var _default = {
} }
}); });
}, },
// 获取账号信息
handleHomeUserInfo: function handleHomeUserInfo() {
var that = this;
that.$model.getHomeUserInfo({}).then(function (res) {
if (res.code != 0) return;
that.$store.commit('changeUserInfo', res.data);
});
},
//确定年龄 //确定年龄
maskClick: function maskClick(e) { maskClick: function maskClick(e) {
console.log("出生日期", e.detail.value); console.log("出生日期", e.detail.value);

View File

@ -1 +1 @@
<view class="content data-v-0838061c"><view class="lanBox data-v-0838061c"><view class="headbox data-v-0838061c"><block wx:if="{{user.head_pic}}"><view class="touxiang data-v-0838061c"><image class="headimage data-v-0838061c" src="{{user.head_pic}}"></image></view></block><block wx:else><view class="touxiang data-v-0838061c"><image class="headimage data-v-0838061c" src="/static/tou.png"></image></view></block></view><view class="lan border-bottom data-v-0838061c"><view class="left data-v-0838061c">昵称</view><view class="right data-v-0838061c"><input class="name data-v-0838061c" name="name" type="text" placeholder="请输入" data-event-opts="{{[['input',[['__set_model',['$0','nickname','$event',[]],['memInfo']]]]]}}" value="{{memInfo.nickname}}" bindinput="__e"/><block wx:if="{{!memInfo.nickname}}"><icon class="iconfont icon-bianji data-v-0838061c"></icon></block><block wx:else><icon data-event-opts="{{[['tap',[['e0',['$event']]]]]}}" class="iconfont icon-error data-v-0838061c" bindtap="__e"></icon></block></view></view><view class="lan border-bottom data-v-0838061c"><view class="left data-v-0838061c">性别</view><view class="right data-v-0838061c"><picker mode="selector" range="{{sexItem}}" data-event-opts="{{[['change',[['onsexArr',['$event']]]]]}}" bindchange="__e" class="data-v-0838061c"><view class="uni-input data-v-0838061c">{{memInfo.gender==0?'请选择':memInfo.gender==1?'男':'女'}}</view><icon class="iconfont icon-arrow-down data-v-0838061c"></icon></picker></view></view><view class="lan border-bottom data-v-0838061c"><view class="left data-v-0838061c">出生日期</view><view class="right data-v-0838061c"><picker mode="date" end="{{endDate}}" value="{{memInfo.birthday?memInfo.birthday:endDate}}" data-event-opts="{{[['change',[['maskClick',['$event']]]]]}}" bindchange="__e" class="data-v-0838061c"><view class="uni-input data-v-0838061c">{{memInfo.birthday?memInfo.birthday:"请选择"}}</view><icon class="iconfont icon-arrow-down data-v-0838061c"></icon></picker></view></view><view class="lan border-bottom data-v-0838061c"><view class="left data-v-0838061c">身高</view><view class="right data-v-0838061c"><input type="digit" placeholder="请输入" data-event-opts="{{[['input',[['__set_model',['$0','height','$event',[]],['memInfo']]]]]}}" value="{{memInfo.height}}" bindinput="__e" class="data-v-0838061c"/><text class="data-v-0838061c">cm</text></view></view><view class="lan border-bottom data-v-0838061c"><view class="left data-v-0838061c">体重</view><view class="right data-v-0838061c"><input type="digit" placeholder="请输入" data-event-opts="{{[['input',[['__set_model',['$0','weight','$event',[]],['memInfo']]]]]}}" value="{{memInfo.weight}}" bindinput="__e" class="data-v-0838061c"/><text class="data-v-0838061c">kg</text></view></view><view class="lan border-bottom data-v-0838061c"><view class="left data-v-0838061c">活动系数</view><view class="right data-v-0838061c"><picker mode="selector" range="{{activityLevel}}" range-key="name" value="{{levelInd}}" data-event-opts="{{[['change',[['changeClickType',['$event']]]]]}}" bindchange="__e" class="data-v-0838061c"><view class="data-v-0838061c">{{''+activityLevel[levelInd].name+''}}<icon class="iconfont icon-arrow-down data-v-0838061c"></icon></view></picker></view></view></view><view data-event-opts="{{[['tap',[['confirmInfo',['$event']]]]]}}" class="btn data-v-0838061c" bindtap="__e">提交</view></view> <view class="content data-v-0838061c"><view class="lanBox data-v-0838061c"><view class="headbox data-v-0838061c"><block wx:if="{{user.head_pic}}"><view class="touxiang data-v-0838061c"><image class="headimage data-v-0838061c" src="{{user.head_pic}}"></image></view></block><block wx:else><view class="touxiang data-v-0838061c"><image class="headimage data-v-0838061c" src="/static/tou.png"></image></view></block></view><view class="lan border-bottom data-v-0838061c"><view class="left data-v-0838061c">昵称</view><view class="right data-v-0838061c"><input class="name data-v-0838061c" name="name" type="text" placeholder="请输入" data-event-opts="{{[['input',[['__set_model',['$0','nickname','$event',[]],['memInfo']]]]]}}" value="{{memInfo.nickname}}" bindinput="__e"/><block wx:if="{{!memInfo.nickname}}"><icon class="iconfont icon-bianji data-v-0838061c"></icon></block><block wx:else><icon data-event-opts="{{[['tap',[['e0',['$event']]]]]}}" class="iconfont icon-error data-v-0838061c" bindtap="__e"></icon></block></view></view><view class="lan border-bottom data-v-0838061c"><view class="left data-v-0838061c">性别</view><view class="right data-v-0838061c"><picker mode="selector" range="{{sexItem}}" data-event-opts="{{[['change',[['onsexArr',['$event']]]]]}}" bindchange="__e" class="data-v-0838061c"><view class="uni-input data-v-0838061c">{{memInfo.gender==0?'请选择':memInfo.gender==1?'男':'女'}}</view><icon class="iconfont icon-arrow-down data-v-0838061c"></icon></picker></view></view><view class="lan border-bottom data-v-0838061c"><view class="left data-v-0838061c">出生日期</view><view class="right data-v-0838061c"><picker mode="date" end="{{endDate}}" value="{{memInfo.birthday?memInfo.birthday:endDate}}" data-event-opts="{{[['change',[['maskClick',['$event']]]]]}}" bindchange="__e" class="data-v-0838061c"><view class="uni-input data-v-0838061c">{{memInfo.birthday?memInfo.birthday:"请选择"}}</view><icon class="iconfont icon-arrow-down data-v-0838061c"></icon></picker></view></view><view class="lan border-bottom data-v-0838061c"><view class="left data-v-0838061c">身高</view><view class="right data-v-0838061c"><input type="digit" placeholder="请输入" data-event-opts="{{[['input',[['__set_model',['$0','height','$event',[]],['memInfo']]]]]}}" value="{{memInfo.height}}" bindinput="__e" class="data-v-0838061c"/><text class="data-v-0838061c">cm</text></view></view><view class="lan border-bottom data-v-0838061c"><view class="left data-v-0838061c">体重</view><view class="right data-v-0838061c"><input type="digit" placeholder="请输入" data-event-opts="{{[['input',[['__set_model',['$0','weight','$event',[]],['memInfo']]]]]}}" value="{{memInfo.weight}}" bindinput="__e" class="data-v-0838061c"/><text class="data-v-0838061c">kg</text></view></view><view class="lan border-bottom data-v-0838061c"><view class="left data-v-0838061c">活动系数</view><view class="right data-v-0838061c"><picker mode="selector" range="{{activityLevel}}" range-key="name" value="{{levelInd}}" data-event-opts="{{[['change',[['changeClickType',['$event']]]]]}}" bindchange="__e" class="data-v-0838061c"><view class="data-v-0838061c">{{''+(levelInd?activityLevel[levelInd].name:'请选择')+''}}<icon class="iconfont icon-arrow-down data-v-0838061c"></icon></view></picker></view></view></view><view data-event-opts="{{[['tap',[['confirmInfo',['$event']]]]]}}" class="btn data-v-0838061c" bindtap="__e">提交</view></view>

View File

@ -226,7 +226,7 @@ var _default = {
cookIndex: null cookIndex: null
}; };
}, },
computed: _objectSpread(_objectSpread({}, (0, _vuex.mapState)(["configInfo"])), {}, { computed: _objectSpread(_objectSpread({}, (0, _vuex.mapState)(["configInfo", "user"])), {}, {
menu: function menu() { menu: function menu() {
return this.configInfo.cookbook_label; return this.configInfo.cookbook_label;
} }
@ -400,6 +400,10 @@ var _default = {
that.$tools.msg("登录后查看等多!"); that.$tools.msg("登录后查看等多!");
return; return;
} }
if (that.user.aud_id == '') {
that.$tools.msg("完善资料后查看更多");
return;
}
if (!that.info.cover) { if (!that.info.cover) {
that.$tools.msg("请上传封面图!"); that.$tools.msg("请上传封面图!");
return; return;

File diff suppressed because one or more lines are too long

View File

@ -208,14 +208,13 @@ var _default = {
return this.configInfo.kcal_data; return this.configInfo.kcal_data;
}, },
foodInfo: function foodInfo() { foodInfo: function foodInfo() {
var _this = this;
var that = this; var that = this;
this.handTrue = false; this.handTrue = false;
this.$nextTick(function () { that.$nextTick(function () {
_this.handTrue = true; that.handTrue = true;
that.chartData.series[0].data = _this.user.aud_id != "" ? Number(_this.user.food_count.nutrients_four[0].proportion) / 100 : 0; that.chartData.series[0].data = that.user.aud_id ? Number(that.user.food_count.nutrients_four[0].proportion) / 100 : 0;
}); });
return this.user.aud_id != "" ? this.user.food_count : this.configInfo.default_count_foot; return this.user.aud_id ? this.user.food_count : this.configInfo.default_count_foot;
} }
}), }),
onLoad: function onLoad() { onLoad: function onLoad() {
@ -245,7 +244,7 @@ var _default = {
that.handTrue = false; that.handTrue = false;
this.$nextTick(function () { this.$nextTick(function () {
that.handTrue = true; that.handTrue = true;
that.chartData.series[0].data = that.user.aud_id != "" ? Number(that.user.food_count.nutrients_four[0].proportion) / 100 : 0; that.chartData.series[0].data = that.user.aud_id ? Number(that.user.food_count.nutrients_four[0].proportion) / 100 : 0;
}); });
this.startWatching(); this.startWatching();
}, },
@ -256,7 +255,7 @@ var _default = {
handleInfo: function handleInfo() { handleInfo: function handleInfo() {
var that = this; var that = this;
this.$nextTick(function () { this.$nextTick(function () {
that.chartData.series[0].data = that.user.aud_id == "" ? 0 : Number(that.user.food_count.nutrients_four[0].proportion) / 100; that.chartData.series[0].data = that.user.aud_id ? 0 : Number(that.user.food_count.nutrients_four[0].proportion) / 100;
}); });
}, },
startWatching: function startWatching() { startWatching: function startWatching() {
@ -286,12 +285,22 @@ var _default = {
url: "/pageTwo/login/login" url: "/pageTwo/login/login"
}); });
}, },
// 登录
handleUserEdit: function handleUserEdit() {
uni.navigateTo({
url: "/pageTwo/me/userEdit"
});
},
handleAddFood: function handleAddFood(name) { handleAddFood: function handleAddFood(name) {
var that = this; var that = this;
if (!that.token) { if (!that.token) {
that.$tools.msg("登录后查看更多"); that.$tools.msg("登录后查看更多");
return; return;
} }
if (that.info.aud_id == '') {
that.$tools.msg("完善资料后查看更多");
return;
}
unwatch(); unwatch();
uni.navigateTo({ uni.navigateTo({
url: "/pageTwo/count/search?name=" + name + "&time=" + this.foodInfo.date url: "/pageTwo/count/search?name=" + name + "&time=" + this.foodInfo.date
@ -299,10 +308,15 @@ var _default = {
}, },
// 功能页面跳转 // 功能页面跳转
navTo: function navTo(url) { navTo: function navTo(url) {
var that = this;
if (!this.token) { if (!this.token) {
this.$tools.msg("登录后查看更多"); this.$tools.msg("登录后查看更多");
return; return;
} }
if (that.info.aud_id == '') {
that.$tools.msg("完善资料后查看更多");
return;
}
uni.navigateTo({ uni.navigateTo({
url: url url: url
}); });

File diff suppressed because one or more lines are too long

View File

@ -86,10 +86,15 @@ __webpack_require__.r(__webpack_exports__);
"use strict"; "use strict";
/* WEBPACK VAR INJECTION */(function(uni) { /* WEBPACK VAR INJECTION */(function(uni) {
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
Object.defineProperty(exports, "__esModule", { Object.defineProperty(exports, "__esModule", {
value: true value: true
}); });
exports.default = void 0; exports.default = void 0;
var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
var _vuex = __webpack_require__(/*! vuex */ 30);
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
var search = function search() { var search = function search() {
__webpack_require__.e(/*! require.ensure | components/search2 */ "components/search2").then((function () { __webpack_require__.e(/*! require.ensure | components/search2 */ "components/search2").then((function () {
return resolve(__webpack_require__(/*! @/components/search2.vue */ 286)); return resolve(__webpack_require__(/*! @/components/search2.vue */ 286));
@ -114,6 +119,7 @@ var _default = {
components: { components: {
search: search search: search
}, },
computed: _objectSpread({}, (0, _vuex.mapState)(["user"])),
onLoad: function onLoad(options) { onLoad: function onLoad(options) {
var that = this; var that = this;
that.search_value = options.name; that.search_value = options.name;
@ -146,6 +152,11 @@ var _default = {
}, },
// 商品详情 // 商品详情
handleDetail: function handleDetail(id) { handleDetail: function handleDetail(id) {
var that = this;
if (that.user.aud_id == '') {
that.$tools.msg("完善资料后查看更多");
return;
}
uni.navigateTo({ uni.navigateTo({
url: "/pageTwo/me/menudetail?id=" + id url: "/pageTwo/me/menudetail?id=" + id
}); });

View File

@ -20,7 +20,7 @@
"ignoreUploadUnusedFiles": false "ignoreUploadUnusedFiles": false
}, },
"compileType": "miniprogram", "compileType": "miniprogram",
"libVersion": "2.32.3", "libVersion": "3.12.1",
"appid": "wx1f32af4f93c913f6", "appid": "wx1f32af4f93c913f6",
"projectname": "kitchendDevice", "projectname": "kitchendDevice",
"condition": {}, "condition": {},