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 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.good_name }}
+ {{ item.Specifications_name }}
+
+
+
+ ¥ {{item.Specifications_money/100}}
+
+
+ -
+ {{item.num}}
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ 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 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ info.list_images.split(',').length }}张
+
+
+
+
+
+
+ {{ info.money / 100 }}
+
+
+
+
+ {{ item }}
+
+
+ {{ info.title }}
+
+
+
+
+
+
+ {{item.title}}
+ {{item.money/100}}
+
+
+
+
+
+ 购买须知
+
+
+
+ 商品须知
+
+
+
+
+
+
+
+
+
+
+
+ 购物车
+
+
+
+
+
+ 加入购物车
+ 立即购买
+
+
+
+
+
+
+
+
+
+
+ 购物车
+
+
+ 总计:
+ ¥
+ {{paramData.iNum}}
+ .{{paramData.fNum}}
+
+
+
+
+
+ 去结算
+
+
+
+
+
+
+
+
+
+
+
+ {{addCartOrOrder?'加入购物车':'立即购买'}}
+
+
+
+
+
+
+
+
+
\ 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 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 味 | WEI
+
+
+
+
+
+
+
+
+ {{item.goods.title}}
+
+
+ {{item.goods.money/100}}
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 暂无搜索结果
+
+
+
+
+
+
+
+
+ {{item.goods.title}}
+
+
+ {{item.goods.money/100}}
+ {{item.goods.price/100}}
+
+ +
+
+
+
+
+
+
+
+
+
+
+ {{item.goods.title}}
+
+
+ {{item.goods.money/100}}
+ {{item.goods.price/100}}
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 总计:
+ ¥
+ {{paramData.iNum}}
+ .{{paramData.fNum}}
+
+
+ 明细
+
+
+
+
+
+
+ 去结算
+
+
+
+
+
+
+
+
+
+
+
+ 加入购物车
+
+
+
+
+
+
+
+
+
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 @@
+
+
+
+
+
+
+
+
+
+ 收货地址
+
+
+ 更多
+
+
+
+
+
+
+
+
+ {{ contacts.name }}
+ {{ contacts.tel }}
+
+ {{ contacts.province_text + contacts.city_text + contacts.district_text + contacts.detail_addr }}
+
+
+
+
+ 添加
+
+
+
+
+
+
+
+
+
+
+ {{sku.goodsInfo.merchant_name}}
+
+
+
+
+
+ {{ sku.goodsInfo.title }}
+
+ {{sku.skuInfo.money/100}}
+
+
+
+ {{ sku.skuInfo.title }}
+
+ x{{sku.skuInfo.buyNum}}
+
+
+
+
+
+
+ 购买数量
+
+
+
+ -
+
+ +
+
+
+
+
+
+ 运费
+
+
+ {{!sku.post?'免邮':sku.post/100}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 合计:
+ {{ total() }}
+ 含邮费:¥{{ post / 100 }}
+
+ 立即支付
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ 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 @@
+
+
+
+
+
+ {{item.extract_name}}
+
+
+ 地址:{{item.detail_addr}}
+
+
+
+
+
+
+ 去这里
+
+
+
+
+
+
+ 暂无自提点地址
+
+
+
+
+
+
+
+
+
+
+