diff --git a/components/addressAdd.vue b/components/addressAdd.vue new file mode 100644 index 0000000..ec68b5b --- /dev/null +++ b/components/addressAdd.vue @@ -0,0 +1,398 @@ + + + + + diff --git a/components/cartData.vue b/components/cartData.vue new file mode 100644 index 0000000..274aa39 --- /dev/null +++ b/components/cartData.vue @@ -0,0 +1,455 @@ + + + + + \ No newline at end of file diff --git a/components/contactAdd.vue b/components/contactAdd.vue new file mode 100644 index 0000000..c6d7d8a --- /dev/null +++ b/components/contactAdd.vue @@ -0,0 +1,265 @@ + + + + + diff --git a/package.json b/package.json new file mode 100644 index 0000000..2f2856a --- /dev/null +++ b/package.json @@ -0,0 +1,19 @@ +{ + "name": "cgc_wechat", + "version": "1.0.0", + "description": "", + "main": "main.js", + "dependencies": { + "ydui-district": "^1.1.0" + }, + "devDependencies": {}, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "http://123.60.98.226:3000/chenkainan/cgc_WeChat.git" + }, + "author": "", + "license": "ISC" +} diff --git a/pages.json b/pages.json index a4ecdf4..3b54199 100644 --- a/pages.json +++ b/pages.json @@ -71,6 +71,25 @@ "style" : { "navigationBarTitleText" : "下单" } + }, + { + "path": "techan/index", + "style": { + "navigationBarTitleText": "", + "navigationStyle": "custom" + } + }, + { + "path": "techan/detail", + "style": { + "navigationBarTitleText": "" + } + }, + { + "path": "techan/order", + "style": { + "navigationBarTitleText": "确认订单" + } } ] }], diff --git a/static/css/base.css b/static/css/base.css index 83ecd6b..2442a04 100644 --- a/static/css/base.css +++ b/static/css/base.css @@ -69,3 +69,39 @@ view { color: #999999; } +.flex{ + display: flex; +} +.flex-shrink-0{ + flex-shrink: 0; +} +.flex-1{ + flex: 1; +} +.flex-wrap{ + flex-wrap: wrap; +} +.w-full{ + width: 100%; +} +.w-1rpx{ + width: 1rpx; +} +.h-1rpx{ + height: 1rpx; +} +.relative{ + position: relative; +} +.absolute{ + position: absolute; +} +.flex-items-center{ + align-items: center; +} +.no-scrollbar::-webkit-scrollbar{ + display: none; +} +.font-bold{ + font-weight: bold; +} \ No newline at end of file diff --git a/static/js/CommonFunction.js b/static/js/CommonFunction.js index 08b5ffa..b2af6a5 100644 --- a/static/js/CommonFunction.js +++ b/static/js/CommonFunction.js @@ -222,4 +222,32 @@ Vue.prototype.getHeadImg = type => { ).then(res => { return res.data[0].image }); +} +// 判断是否去外部链接 +Vue.prototype.goOtherDetail = (item,type) => { + if(item.link_type == 1) { + // 外部小程序 + uni.navigateToMiniProgram({ + shortLink: item.ext_link + }) + return true + }else if(item.link_type == 2){ + // 外部H5 + uni.navigateTo({ + url: '/subPackages/webPage/webPage?url=' + item.ext_link + }); + return true + } +} +// 根据类型判断详情页 +Vue.prototype.goDetailByType= function(item){ + let res = this.goOtherDetail(item) + if (res) { + return + } + + uni.navigateTo({ + url: `/subPackages/techan/detail?id=?${item.id}` + }) + } \ No newline at end of file diff --git a/static/js/request.js b/static/js/request.js index 954d181..5da4c17 100644 --- a/static/js/request.js +++ b/static/js/request.js @@ -18,8 +18,8 @@ const getToken = () => { return store.state.user.userInfo.token; }; -// 定义错误处理函数 -const handleError = (res, reject) => { +// 定义错误处理函数 noForceLogin 不强制登录 +const handleError = (res, reject, noForceLogin) => { setTimeout(() => { uni.showToast({ title: res.data?.msg || res.msg, @@ -28,6 +28,7 @@ const handleError = (res, reject) => { reject(res); }, 0); if (res.data?.code === 401) { + if (noForceLogin) { return } store.commit('changeLoginPath'); } }; @@ -67,7 +68,7 @@ Vue.prototype.Post = (params = {}, apiurl) => { fail: (err) => { console.log('err', err); uni.hideLoading() - handleError(err, reject); + handleError(err, reject, params.noForceLogin); } }); }); diff --git a/subPackages/techan/detail.vue b/subPackages/techan/detail.vue new file mode 100644 index 0000000..6c47d8a --- /dev/null +++ b/subPackages/techan/detail.vue @@ -0,0 +1,792 @@ + + + + + \ No newline at end of file diff --git a/subPackages/techan/index.vue b/subPackages/techan/index.vue new file mode 100644 index 0000000..91dd487 --- /dev/null +++ b/subPackages/techan/index.vue @@ -0,0 +1,789 @@ + + + + + diff --git a/subPackages/techan/order.vue b/subPackages/techan/order.vue new file mode 100644 index 0000000..9d0f747 --- /dev/null +++ b/subPackages/techan/order.vue @@ -0,0 +1,1281 @@ + + + + + \ No newline at end of file diff --git a/subPackages/techan/selfPickUpPoint.vue b/subPackages/techan/selfPickUpPoint.vue new file mode 100644 index 0000000..a083c53 --- /dev/null +++ b/subPackages/techan/selfPickUpPoint.vue @@ -0,0 +1,253 @@ + + + + +